X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/5ef582473f6b329be18ad83c61e053fdcd9c6ed5..b027832862272283d9203c994ec8fd39f6196887:/report_send.php diff --git a/report_send.php b/report_send.php index ce698e3c..d8a0690d 100644 --- a/report_send.php +++ b/report_send.php @@ -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);