/** * @see Page::readData() */ public function readData() { parent::readData(); // get default values if (!count($_POST)) { if ($this->userSuspension->expires != 0) { $expires = DateUtil::getLocalTimestamp($this->userSuspension->expires); $this->expiresDay = gmdate('j', $expires); $this->expiresMonth = gmdate('n', $expires); $this->expiresYear = gmdate('Y', $expires); $this->expiresHour = gmdate('G', $expires); $this->expiresMinute = gmdate('i', $expires); $this->expiresMinute -= $this->expiresMinute % 5; } } }
/** * @see Page::readData() */ public function readData() { parent::readData(); // get predefined warnings $this->warnings = Warning::getWarnings(); // get warning object if ($this->userWarning->objectID != 0 && $this->userWarning->objectType != '') { $this->object = Warning::getWarningObjectByID($this->userWarning->objectType, $this->userWarning->objectID); } // get default values if (!count($_POST)) { $this->warningID = $this->userWarning->warningID; $this->title = $this->userWarning->title; $this->points = $this->userWarning->points; $this->reason = $this->userWarning->reason; if ($this->userWarning->expires != 0) { $expires = DateUtil::getLocalTimestamp($this->userWarning->expires); $this->expiresDay = gmdate('j', $expires); $this->expiresMonth = gmdate('n', $expires); $this->expiresYear = gmdate('Y', $expires); $this->expiresHour = gmdate('G', $expires); $this->expiresMinute = gmdate('i', $expires); $this->expiresMinute -= $this->expiresMinute % 5; } } }