1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2025-01-12 00:50:09 +00:00

Chatrooms can be deleted now

This commit is contained in:
Tim Düsterhus 2012-02-04 21:06:44 +01:00
parent fdfc16f6a3
commit d79552c371
3 changed files with 34 additions and 7 deletions

View File

@ -4,12 +4,11 @@
/** /**
* Lists available chatrooms. * Lists available chatrooms.
* *
* @author Tim Düsterhus * @author Tim sterhus
* @copyright 2011-2012 Tim Düsterhus * @copyright 2010-2012 Tim sterhus
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php> * @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
* @package com.woltlab.wcf.bbcode * @package timwolla.wcf.chat
* @subpackage acp.page * @subpackage acp.page
* @category Community Framework
*/ */
class ChatRoomListPage extends \wcf\page\MultipleLinkPage { class ChatRoomListPage extends \wcf\page\MultipleLinkPage {
/** /**

View File

@ -0,0 +1,28 @@
<?php
namespace wcf\data\chat\room;
/**
* Executes chatroom-related actions.
*
* @author Tim Düsterhus
* @copyright 2010-2012 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
* @package timwolla.wcf.chat
* @subpackage data.chat.room
*/
class ChatRoomAction extends \wcf\data\AbstractDatabaseObjectAction {
/**
* @see wcf\data\AbstractDatabaseObjectAction::$className
*/
protected $className = '\wcf\data\chat\room\ChatRoomEditor';
/**
* @see wcf\data\AbstractDatabaseObjectAction::$permissionsDelete
*/
protected $permissionsDelete = array('admin.content.chat.canDeleteRoom');
/**
* @see wcf\data\AbstractDatabaseObjectAction::$permissionsUpdate
*/
protected $permissionsUpdate = array('admin.content.chat.canEditRoom');
}

View File

@ -20,7 +20,7 @@ class ChatRoomEditor extends \wcf\data\DatabaseObjectEditor implements \wcf\data
* Clears the room cache. * Clears the room cache.
*/ */
public static function resetCache() { public static function resetCache() {
self::getCache(); ChatRoom::getCache();
CacheHandler::getInstance()->clearResource('chatrooms'); \wcf\system\cache\CacheHandler::getInstance()->clearResource('chatrooms');
} }
} }