1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-23 21:50:09 +00:00
Tims-Chat/file/lib/data/suspension/SuspensionAction.class.php

36 lines
921 B
PHP
Raw Normal View History

2012-05-19 19:25:50 +00:00
<?php
2013-01-19 19:36:40 +00:00
namespace chat\data\suspension;
2012-05-19 19:25:50 +00:00
/**
* Executes chat-suspension-related actions.
*
* @author Tim Düsterhus
2013-01-19 19:36:40 +00:00
* @copyright 2010-2013 Tim Düsterhus
2012-05-19 19:25:50 +00:00
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
2013-01-19 19:36:40 +00:00
* @package be.bastelstu.chat
* @subpackage data.suspension
2012-05-19 19:25:50 +00:00
*/
2013-01-19 19:36:40 +00:00
class SuspensionAction extends \wcf\data\AbstractDatabaseObjectAction {
2012-05-19 19:25:50 +00:00
/**
* @see \wcf\data\AbstractDatabaseObjectAction::$className
*/
2013-01-19 19:36:40 +00:00
protected $className = '\chat\data\suspension\SuspensionEditor';
2012-05-19 19:25:50 +00:00
2013-06-22 12:40:54 +00:00
/**
* Revokes suspensions.
*/
public function revoke() {
if (!isset($this->parameters['revoker'])) {
$this->parameters['revoker'] = null;
}
$objectAction = new self($this->objectIDs, 'update', array(
'data' => array(
2013-06-22 14:35:48 +00:00
'expires' => TIME_NOW,
2013-06-22 12:40:54 +00:00
'revoker' => $this->parameters['revoker']
)
));
$objectAction->executeAction();
2012-05-19 19:25:50 +00:00
}
}