2013-06-04 20:54:11 +00:00
|
|
|
|
<?php
|
|
|
|
|
namespace chat\acp\page;
|
|
|
|
|
use \wcf\system\WCF;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Lists chat suspensions.
|
|
|
|
|
*
|
|
|
|
|
* @author Maximilian Mader
|
|
|
|
|
* @copyright 2010-2013 Tim D<EFBFBD>sterhus
|
|
|
|
|
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
|
|
|
|
|
* @package be.bastelstu.chat
|
|
|
|
|
* @subpackage acp.page
|
|
|
|
|
*/
|
|
|
|
|
class SuspensionListPage extends \wcf\page\SortablePage {
|
|
|
|
|
/**
|
|
|
|
|
* @see \wcf\page\AbstractPage::$activeMenuItem
|
|
|
|
|
*/
|
|
|
|
|
public $activeMenuItem = 'chat.acp.menu.link.suspension.list';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @see \wcf\page\AbstractPage::$neededPermissions
|
|
|
|
|
*/
|
|
|
|
|
public $neededPermissions = array();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @see wcf\page\SortablePage::$defaultSortField
|
|
|
|
|
*/
|
|
|
|
|
public $defaultSortField = 'username';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @see wcf\page\MultipleLinkPage::$itemsPerPage
|
|
|
|
|
*/
|
|
|
|
|
public $itemsPerPage = 50;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @see wcf\page\SortablePage::$validSortFields
|
|
|
|
|
*/
|
|
|
|
|
public $validSortFields = array('suspensionID', 'userID', 'username', 'roomID', 'type', 'expires');
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @see wcf\page\MultipleLinkPage::$objectListClassName
|
|
|
|
|
*/
|
|
|
|
|
public $objectListClassName = 'chat\data\suspension\SuspensionList';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @see wcf\page\MultipleLinkPage::readObjects()
|
|
|
|
|
*/
|
|
|
|
|
protected function initObjectList() {
|
|
|
|
|
parent::initObjectList();
|
|
|
|
|
|
2013-06-04 21:39:42 +00:00
|
|
|
|
$this->objectList->sqlSelects .= "user_table.username";
|
|
|
|
|
$this->objectList->sqlJoins .= " LEFT JOIN wcf".WCF_N."_user user_table
|
|
|
|
|
ON suspension.userID = user_table.userID";
|
|
|
|
|
$this->objectList->getConditionBuilder()->add('expires >= ?', array(TIME_NOW));
|
2013-06-04 20:54:11 +00:00
|
|
|
|
}
|
|
|
|
|
}
|