/**
  * @see Form::save()
  */
 public function save()
 {
     AbstractForm::save();
     // update
     $this->suspension->update($this->title, $this->points, $this->suspension->suspensions == 0 ? $this->suspensionType : $this->suspension->suspensionType, $this->suspension->suspensions == 0 ? $this->suspensionTypeObject->getData() : unserialize($this->suspension->suspensionData), $this->expiresHour * 3600 + $this->expiresDay * 86400 + $this->expiresWeek * 86400 * 7);
     $this->saved();
     // show success message
     WCF::getTPL()->assign('success', true);
 }
 /**
  * @see Action::execute()
  */
 public function execute()
 {
     parent::execute();
     // check permission
     WCF::getUser()->checkPermission('admin.user.infraction.canDeleteSuspension');
     // delete suspension
     $this->suspension->delete();
     $this->executed();
     // forward to list page
     HeaderUtil::redirect('index.php?page=SuspensionList&deletedSuspensionID=' . $this->suspensionID . '&packageID=' . PACKAGE_ID . SID_ARG_2ND_NOT_ENCODED);
     exit;
 }
 /**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     // save
     SuspensionEditor::create($this->title, $this->points, $this->suspensionType, $this->suspensionTypeObject->getData(), $this->expiresHour * 3600 + $this->expiresDay * 86400 + $this->expiresWeek * 86400 * 7);
     $this->saved();
     // reset values
     $this->title = $this->suspensionType = '';
     $this->points = $this->expiresWeek = $this->expiresDay = $this->expiresHour = 0;
     $this->suspensionTypeObject = null;
     // show success message
     WCF::getTPL()->assign('success', true);
 }