A bit more refactoring.
[timetracker.git] / export.php
index 3c46a5b..f046949 100644 (file)
@@ -45,7 +45,7 @@ $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')));
 
-if ($request->getMethod() == 'POST') {
+if ($request->isPost()) {
 
   $filename = 'team_data.xml';
   $mime_type = 'text/xml';
@@ -74,8 +74,8 @@ if ($request->getMethod() == 'POST') {
     }
     exit;
   } else
-    $errors->add($i18n->getKey('error.sys'));
-}
+    $err->add($i18n->getKey('error.sys'));
+} // isPost
 
 $smarty->assign('forms', array($form->getName()=>$form->toArray()));
 $smarty->assign('title', $i18n->getKey('title.export'));