X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=report_send.php;h=526457bf4eafb2a57a7f80824e22f6e3cd9032c2;hb=19f479eb795f39d331fbfe33ab20534112555630;hp=d7c031fd7481a37ffbd24aecb451fc9661358fd3;hpb=030d2c3ffbf8229cc945427e9e9f7704226effe1;p=timetracker.git diff --git a/report_send.php b/report_send.php index d7c031fd..526457bf 100644 --- a/report_send.php +++ b/report_send.php @@ -29,7 +29,7 @@ require_once('initialize.php'); import('form.Form'); import('form.ActionForm'); -import('ttSysConfig'); +import('ttUserConfig'); import('ttReportHelper'); // Access check. @@ -38,7 +38,7 @@ if (!(ttAccessAllowed('view_own_reports') || ttAccessAllowed('view_reports'))) { exit(); } -$sc = new ttSysConfig($user->id); +$uc = new ttUserConfig(); if ($request->isPost()) { $cl_receiver = trim($request->getParameter('receiver')); @@ -46,8 +46,8 @@ if ($request->isPost()) { $cl_subject = trim($request->getParameter('subject')); $cl_comment = trim($request->getParameter('comment')); } else { - $cl_receiver = $sc->getValue(SYSC_LAST_REPORT_EMAIL); - $cl_cc = $sc->getValue(SYSC_LAST_REPORT_CC); + $cl_receiver = $uc->getValue(SYSC_LAST_REPORT_EMAIL); + $cl_cc = $uc->getValue(SYSC_LAST_REPORT_CC); $cl_subject = $i18n->get('form.mail.report_subject'); } @@ -67,13 +67,15 @@ if ($request->isPost()) { if ($err->no()) { // Save last report emails for future use. - $sc->setValue(SYSC_LAST_REPORT_EMAIL, $cl_receiver); - $sc->setValue(SYSC_LAST_REPORT_CC, $cl_cc); + $uc->setValue(SYSC_LAST_REPORT_EMAIL, $cl_receiver); + $uc->setValue(SYSC_LAST_REPORT_CC, $cl_cc); // Obtain session bean with report attributes. $bean = new ActionForm('reportBean', new Form('reportForm')); + $options = ttReportHelper::getReportOptions($bean); + // Prepare report body. - $body = ttReportHelper::prepareReportBody($bean, $cl_comment); + $body = ttReportHelper::prepareReportBody($options, $cl_comment); import('mail.Mailer'); $mailer = new Mailer();