/**
  * @see Page::assignVariables()
  */
 public function assignVariables()
 {
     parent::assignVariables();
     InlineCalendar::assignVariables();
     WCF::getTPL()->assign(array('userWarnings' => $this->userWarningList->getObjects(), 'deletedUserWarningID' => $this->deletedUserWarningID, 'username' => $this->username, 'judge' => $this->judge, 'warningID' => $this->warningID, 'status' => $this->status, 'fromDay' => $this->fromDay, 'fromMonth' => $this->fromMonth, 'fromYear' => $this->fromYear, 'untilDay' => $this->untilDay, 'untilMonth' => $this->untilMonth, 'untilYear' => $this->untilYear, 'availableWarnings' => Warning::getWarnings()));
 }
 /**
  * @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;
         }
     }
 }
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
     // get predefined warnings
     $this->warnings = Warning::getWarnings();
 }