From 326a23aded279dedc8a4e6de64618f0fbee17bac Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Thu, 13 Oct 2011 12:24:43 -0700 Subject: Changed the moderator schedule table to a view. Finished the exception iterator. Modified Post to only notify the next moderator. Need to add exception adding/removal. --- htdocs/src/Post.inc.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'htdocs/src/Post.inc.php') diff --git a/htdocs/src/Post.inc.php b/htdocs/src/Post.inc.php index eaad6b3..c99f938 100644 --- a/htdocs/src/Post.inc.php +++ b/htdocs/src/Post.inc.php @@ -414,8 +414,7 @@ class Post { } public function notifyModerators() { - $ui = new UserIterator(); - $ui->filterNotify(true); + $ui = new ModerationSchedule(); $ui->query(); $url = buildUrl('postings/' . $this->getId() .'.html?moderate'); @@ -425,10 +424,10 @@ class Post { $email->appendMessage("A new posting is awaiting moderation.\nYou can view the post at $url"); if ($ui->valid()) { - foreach($ui as $user) { - $email->setTo($user->getEmail()); - $email->send(); - } + $user = $ui->current(); + + $email->setTo($user->getEmail()); + $email->send(); } } } -- cgit v1.2.3