]> wagnertech.de Git - timetracker.git/blobdiff - report_send.php
Introduced shorter functions for Errors class
[timetracker.git] / report_send.php
index 18e731e8ae9c8afa58e0ae2c7e352befced5dd6a..d8a0690d87e2690ddf2283bcd43cbb1839971624 100644 (file)
@@ -64,17 +64,17 @@ if ($request->getMethod() == 'POST') {
   if (!ttValidEmailList($cl_cc, true)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('form.mail.cc'));
   if (!ttValidString($cl_subject)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('form.mail.subject'));
   if (!ttValidString($cl_comment, true)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.comment'));
-  
+
   if ($errors->isEmpty()) {
     // Save last report emails for future use.
     $sc->setValue(SYSC_LAST_REPORT_EMAIL, $cl_receiver);
-       $sc->setValue(SYSC_LAST_REPORT_CC, $cl_cc);
-       
-       // Obtain session bean with report attributes.
-       $bean = new ActionForm('reportBean', new Form('reportForm'));
-       // Prepare report body.
-       $body = ttReportHelper::prepareReportBody($bean, $cl_comment);
-               
+    $sc->setValue(SYSC_LAST_REPORT_CC, $cl_cc);
+
+    // Obtain session bean with report attributes.
+    $bean = new ActionForm('reportBean', new Form('reportForm'));
+    // Prepare report body.
+    $body = ttReportHelper::prepareReportBody($bean, $cl_comment);
+
     import('mail.Mailer');
     $mailer = new Mailer();
     $mailer->setCharSet(CHARSET);
@@ -96,4 +96,3 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray()));
 $smarty->assign('onload', 'onLoad="document.mailForm.'.($cl_receiver?'comment':'receiver').'.focus()"');
 $smarty->assign('content_page_name', 'mail.tpl');
 $smarty->display('index.tpl');
-?>
\ No newline at end of file