X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/67c8fa59139659b2da15c560dd10d18601ab311f..4255418fd8d5a23ff005e4136a0b173b9ad62bd0:/WEB-INF/lib/ttOrgExportHelper.class.php diff --git a/WEB-INF/lib/ttOrgExportHelper.class.php b/WEB-INF/lib/ttOrgExportHelper.class.php index aa9c9051..719c486b 100644 --- a/WEB-INF/lib/ttOrgExportHelper.class.php +++ b/WEB-INF/lib/ttOrgExportHelper.class.php @@ -51,7 +51,8 @@ class ttOrgExportHelper { // Write XML to the file. fwrite($file, "\n"); - fwrite($file, "\n"); + $org_part = "getVersion()."\">\n"; + fwrite($file, $org_part); // Use ttGroupExportHelper to export all groups. $groupExportHelper = new ttGroupExportHelper($user->group_id, $file, ' '); // 2 spaces indentation for home group. @@ -98,4 +99,16 @@ class ttOrgExportHelper { fclose ($in_file); return true; } + + private function getVersion() { + $mdb2 = getConnection(); + $sql = "select param_value from tt_site_config where param_name = 'version_db'"; + $res = $mdb2->query($sql); + if (!is_a($res, 'PEAR_Error')) { + $val = $res->fetchRow(); + return $val['param_value']; + $result[] = $val; + } + return false; + } }