X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=export.php;h=2206def2da0cf1935e926015f355620049e6b60a;hb=HEAD;hp=9f3694ca6a5371896f1268fc32643ac440bc69a6;hpb=fd3db1c1a2b975a23c907b2e9b714a0cfe47f3e0;p=timetracker.git diff --git a/export.php b/export.php index 9f3694ca..2206def2 100644 --- a/export.php +++ b/export.php @@ -27,27 +27,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->getMethod() == 'POST') { +if ($request->isPost()) { - $filename = 'team_data.xml'; + $filename = 'group_data.xml'; $mime_type = 'text/xml'; $compress = false; if ('bzip' == $cl_compression) { @@ -56,7 +56,7 @@ if ($request->getMethod() == 'POST') { $mime_type = 'application/x-bzip2'; } - $exportHelper = new ttExportHelper(); + $exportHelper = new ttOrgExportHelper(); if ($exportHelper->createDataFile($compress)) { header('Pragma: public'); // This is needed for IE8 to download files over https. header('Content-Type: '.$mime_type); @@ -74,10 +74,10 @@ if ($request->getMethod() == 'POST') { } exit; } else - $errors->add($i18n->getKey('error.sys')); -} // POST + $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');