X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2FttNotificationHelper.class.php;h=ee7880c4523c8c58c5ddac4835e4ff3ee9eec4f6;hb=6c7a98f61e74aeae700b523729abb49ff19d3704;hp=8fd185c00257a268d689222fd1faa50f84ce4e93;hpb=9a23a8c0a51b7ec38a96f525484134f3cb85dc7e;p=timetracker.git diff --git a/WEB-INF/lib/ttNotificationHelper.class.php b/WEB-INF/lib/ttNotificationHelper.class.php index 8fd185c0..ee7880c4 100644 --- a/WEB-INF/lib/ttNotificationHelper.class.php +++ b/WEB-INF/lib/ttNotificationHelper.class.php @@ -39,7 +39,7 @@ class ttNotificationHelper { $mdb2 = getConnection(); - $sql = "select c.id, c.cron_spec, c.report_id, c.email, c.status, fr.name from tt_cron c + $sql = "select c.id, c.cron_spec, c.report_id, c.email, c.cc, c.subject, c.report_condition, c.status, fr.name from tt_cron c left join tt_fav_reports fr on (fr.id = c.report_id) where c.id = $id and c.team_id = $user->team_id"; $res = $mdb2->query($sql); @@ -75,10 +75,13 @@ class ttNotificationHelper { $next = (int) $fields['next']; $report_id = (int) $fields['report_id']; $email = $fields['email']; + $cc = $fields['cc']; + $subject = $fields['subject']; + $report_condition = $fields['report_condition']; $status = $fields['status']; - $sql = "insert into tt_cron (team_id, cron_spec, next, report_id, email, status) - values ($team_id, ".$mdb2->quote($cron_spec).", $next, $report_id, ".$mdb2->quote($email).", ".$mdb2->quote($status).")"; + $sql = "insert into tt_cron (team_id, cron_spec, next, report_id, email, cc, subject, report_condition, status) + values ($team_id, ".$mdb2->quote($cron_spec).", $next, $report_id, ".$mdb2->quote($email).", ".$mdb2->quote($cc).", ".$mdb2->quote($subject).", ".$mdb2->quote($report_condition).", ".$mdb2->quote($status).")"; $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) return false; @@ -97,12 +100,14 @@ class ttNotificationHelper { $next = (int) $fields['next']; $report_id = (int) $fields['report_id']; $email = $fields['email']; + $cc = $fields['cc']; + $subject = $fields['subject']; + $report_condition = $fields['report_condition']; $status = $fields['status']; - $sql = "update tt_cron set cron_spec = ".$mdb2->quote($cron_spec).", next = $next, report_id = $report_id, email = ".$mdb2->quote($email).", status = ".$mdb2->quote($status). + $sql = "update tt_cron set cron_spec = ".$mdb2->quote($cron_spec).", next = $next, report_id = $report_id, email = ".$mdb2->quote($email).", cc = ".$mdb2->quote($cc).", subject = ".$mdb2->quote($subject).", report_condition = ".$mdb2->quote($report_condition).", status = ".$mdb2->quote($status). " where id = $notification_id and team_id = $team_id"; $affected = $mdb2->exec($sql); return (!is_a($affected, 'PEAR_Error')); } } -?> \ No newline at end of file