Siwtched to using isPost() function
[timetracker.git] / report_send.php
index 505613e..ecd9544 100644 (file)
@@ -40,7 +40,7 @@ if (!ttAccessCheck(right_view_reports)) {
 
 $sc = new ttSysConfig($user->id);
 
-if ($request->getMethod() == 'POST') {
+if ($request->isPost()) {
   $cl_receiver = trim($request->getParameter('receiver'));
   $cl_cc = trim($request->getParameter('cc'));
   $cl_subject = trim($request->getParameter('subject'));
@@ -58,7 +58,7 @@ $form->addInput(array('type'=>'text','name'=>'subject','style'=>'width: 300px;',
 $form->addInput(array('type'=>'textarea','name'=>'comment','maxlength'=>'250','style'=>'width: 300px; height: 60px;'));
 $form->addInput(array('type'=>'submit','name'=>'btn_send','value'=>$i18n->getKey('button.send')));
 
-if ($request->getMethod() == 'POST') {
+if ($request->isPost()) {
   // Validate user input.
   if (!ttValidEmailList($cl_receiver)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('form.mail.to'));
   if (!ttValidEmailList($cl_cc, true)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('form.mail.cc'));