From 08f77678316dca191a736a9b533417f85ab6da04 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 23 Nov 2014 12:36:19 -0800 Subject: [PATCH] Corrected Mail batch copy. --- e107_admin/mailout.php | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/e107_admin/mailout.php b/e107_admin/mailout.php index 4ca6f3d27..6a1904e05 100644 --- a/e107_admin/mailout.php +++ b/e107_admin/mailout.php @@ -527,7 +527,31 @@ class mailout_main_ui extends e_admin_ui } - + function afterCopy($result,$id) + { + if($result == true) + { + $update = array( + 'mail_content_status' => MAIL_STATUS_TEMP, + 'mail_total_count' => 0, + 'mail_togo_count' => 0, + 'mail_sent_count' => 0, + 'mail_fail_count' => 0, + 'mail_bounce_count' => 0, + 'mail_start_send' => '', + 'mail_end_send' => '', + 'mail_create_date' => time(), + 'WHERE' => "mail_source_id IN (".implode(",",$id).")" // FIXME Currently modifies the original instead of the copy. + ); + + if(!e107::getDb()->update('mail_content',$update)) + { + e107::getMessage()->addError(print_a($update,true)); + } + + } + + } private function processSendActions()