From 3e4af45decc95e134fb7f8643b8e9d0eac99a77f Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 1 Aug 2006 07:25:58 +0000 Subject: [PATCH] r1024: Trying to get new bug notifications to work correctly --- includes/class_notification.php | 6 +++++- newreport.php | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/includes/class_notification.php b/includes/class_notification.php index 5f45abf..a7f19ce 100644 --- a/includes/class_notification.php +++ b/includes/class_notification.php @@ -129,6 +129,10 @@ class NotificationCenter { $this->bug = $modified; } + else + { + $this->bug = $original; + } $this->original = $original; $this->modified = $modified; @@ -165,7 +169,7 @@ class NotificationCenter } $masterids = array_merge($this->roles['-notapplicable-'], $this->roles['reporter'], $this->roles['assignee'], $this->roles['favourite'], $this->roles['voter'], $this->roles['commenter']); - $masterids = array_unique($masterids); + $masterids = $this->registry->funct->array_strip_empty(array_unique($masterids)); $userinfo = $this->registry->db->query(" SELECT user.*, useremail.* diff --git a/newreport.php b/newreport.php index 603d9e3..e473265 100755 --- a/newreport.php +++ b/newreport.php @@ -110,8 +110,6 @@ if ($_POST['do'] == 'insert') $notif->send_new_bug_notice($bug->values, $comment->values); - $notif->finalize(); - $bug = new BugAPI($bugsys); // need to destroy because update will think the insert fields need to be changed, too $bug->set('bugid', $comment->values['bugid']); $bug->set_condition(); @@ -125,6 +123,10 @@ if ($_POST['do'] == 'insert') $bug->set('hiddenlastpostbyname', $bugsys->userinfo['displayname']); $bug->update(); + $notif->set_bug_data($bug->values); + + $notif->finalize(); + $message->redirect($lang->string('The bug has been added to the database.'), ($bugsys->in['submit_reload'] == '' ? "showreport.php?bugid=" . $bug->values['bugid'] : 'newreport.php')); } else -- 2.22.5