summaryrefslogtreecommitdiff
path: root/htdocs/src/Post.inc.php
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2011-10-13 12:24:43 -0700
committerJesse Morgan <jesse@jesterpm.net>2017-09-04 11:16:53 -0700
commit326a23aded279dedc8a4e6de64618f0fbee17bac (patch)
treea3444296e388ac65709dfac25490828fc8f433f1 /htdocs/src/Post.inc.php
parent94f12b0a85feb8d8e6effb89021bf79a82174fce (diff)
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.
Diffstat (limited to 'htdocs/src/Post.inc.php')
-rw-r--r--htdocs/src/Post.inc.php11
1 files changed, 5 insertions, 6 deletions
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();
}
}
}