diff options
Diffstat (limited to 'htdocs/src/ModerationExceptions.inc.php')
-rw-r--r-- | htdocs/src/ModerationExceptions.inc.php | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/htdocs/src/ModerationExceptions.inc.php b/htdocs/src/ModerationExceptions.inc.php index 06d98f8..2cf4c9d 100644 --- a/htdocs/src/ModerationExceptions.inc.php +++ b/htdocs/src/ModerationExceptions.inc.php @@ -25,10 +25,30 @@ class ModerationExceptions implements Iterator { $this->expos = 0; } + /** + * Return the current exception row. + */ public function current() { - return User::getById($this->exceptions[$this->expos]['user_id']); + return $this->exceptions[$this->expos]; + } + + /** + * Return the User object for the substitute. + */ + public function getSubstitute() { + return User::getById($this->exceptions[$this->expos]['substitute']); } + /** + * Return the user object for the person who the exception is fore. + */ + public function getUser() { + return User::getById($this->exceptions[$this->expos]['user_id']); + } + + /** + * Return the unix timestamp of the first day of the exception week. + */ public function key() { $year = $this->exceptions[$this->expos]['year']; $week = $this->exceptions[$this->expos]['week'] + 0; @@ -62,4 +82,3 @@ class ModerationExceptions implements Iterator { } ?> - |