Started populating org_id in projects and tasks.
[timetracker.git] / export.php
index 4f1a571..3d61781 100644 (file)
@@ -28,6 +28,7 @@
 
 require_once('initialize.php');
 import('ttExportHelper');
+import('ttOrgExportHelper');
 import('form.Form');
 
 // Access check.
@@ -47,7 +48,7 @@ $form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get(
 
 if ($request->isPost()) {
 
-  $filename = 'team_data.xml';
+  $filename = 'group_data.xml';
   $mime_type = 'text/xml';
   $compress = false;
   if ('bzip' == $cl_compression) {
@@ -56,7 +57,11 @@ if ($request->isPost()) {
     $mime_type = 'application/x-bzip2';
   }
 
-  $exportHelper = new ttExportHelper();
+  if (defined('SUBGROUP_DEBUG') && isTrue(SUBGROUP_DEBUG)) {
+    $exportHelper = new ttOrgExportHelper();
+  } else {
+    $exportHelper = new ttExportHelper();
+  }
   if ($exportHelper->createDataFile($compress)) {
     header('Pragma: public'); // This is needed for IE8 to download files over https.
     header('Content-Type: '.$mime_type);