X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=export.php;h=f278b7c9619ec9727e43d39fb1e57312550a330b;hb=509d1d70d0580e26a4467e123c06d2c8939f32cc;hp=f0469497e40873c3a19c2f480386ad576407f518;hpb=eb55e2f8ca3859482a389795e03b45283e14ef36;p=timetracker.git diff --git a/export.php b/export.php index f0469497..f278b7c9 100644 --- a/export.php +++ b/export.php @@ -28,26 +28,27 @@ require_once('initialize.php'); import('ttExportHelper'); +import('ttOrgExportHelper'); import('form.Form'); // Access check. -if (!ttAccessCheck(right_export_team)) { +if (!ttAccessAllowed('export_data')) { header('Location: access_denied.php'); exit(); } $cl_compression = $request->getParameter('compression'); -$compressors = array('' => $i18n->getKey('form.export.compression_none')); +$compressors = array('' => $i18n->get('form.export.compression_none')); if (function_exists('bzcompress')) - $compressors['bzip'] = $i18n->getKey('form.export.compression_bzip'); + $compressors['bzip'] = $i18n->get('form.export.compression_bzip'); $form = new Form('exportForm'); $form->addInput(array('type'=>'combobox','name'=>'compression','value'=>$cl_compression,'data'=>$compressors)); -$form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->getKey('button.export'))); +$form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.export'))); 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); @@ -74,10 +79,10 @@ if ($request->isPost()) { } exit; } else - $err->add($i18n->getKey('error.sys')); + $err->add($i18n->get('error.sys')); } // isPost $smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('title', $i18n->getKey('title.export')); +$smarty->assign('title', $i18n->get('title.export')); $smarty->assign('content_page_name', 'export.tpl'); $smarty->display('index.tpl');