* @package be.bastelstu.chat * @subpackage data.suspension */ class SuspensionAction extends \wcf\data\AbstractDatabaseObjectAction { /** * @see \wcf\data\AbstractDatabaseObjectAction::$className */ protected $className = '\chat\data\suspension\SuspensionEditor'; /** * Validates permissions and parameters */ public function validateRevoke() { WCF::getSession()->checkPermissions((array) 'admin.chat.canManageSuspensions'); $this->parameters['revoker'] = WCF::getUser()->userID; } /** * Revokes suspensions. */ public function revoke() { if (!isset($this->parameters['revoker'])) { $this->parameters['revoker'] = null; } $objectAction = new self($this->objectIDs, 'update', array( 'data' => array( 'expires' => TIME_NOW, 'revoker' => $this->parameters['revoker'] ) )); $objectAction->executeAction(); } }