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/ModerationSchedule.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'htdocs/src/ModerationSchedule.inc.php') diff --git a/htdocs/src/ModerationSchedule.inc.php b/htdocs/src/ModerationSchedule.inc.php index 4c094e4..6cb1785 100644 --- a/htdocs/src/ModerationSchedule.inc.php +++ b/htdocs/src/ModerationSchedule.inc.php @@ -82,6 +82,7 @@ class ModerationSchedule implements Iterator { $this->moderator = User::getById($this->moderators[$modpos]['user_id']); // Check for exceptions + // TODO: Refactor this exception code to use the ModerationException iterator. if (count($this->exceptions) > 0) { // Skip exceptions prior to the current() date. while ( @@ -101,10 +102,10 @@ class ModerationSchedule implements Iterator { while($this->exceptions[$this->expos]['year'] == $this->year and $this->exceptions[$this->expos]['week'] == $this->week) { - if ($this->exceptions[$i]['user_id'] == $this->moderator->getId()) { + if ($this->exceptions[$this->expos]['user_id'] == $this->moderator->getId()) { // Yes, return the replacement $this->exceptionfor = $this->moderator; - $this->moderator = User::getById($this->exceptions[$this->expos]['user_id']); + $this->moderator = User::getById($this->exceptions[$this->expos]['substitute']); break; } -- cgit v1.2.3