示例#1
0
<?php

/**
 * @version � 2.2 December 20, 2011
 * @author � �RocketTheme http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2011 RocketTheme, LLC
 * @license � http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
 */
// no direct access
defined('_JEXEC') or die('Restricted index access');
jimport('joomla.cache.cache');
global $mctrl;
require_once dirname(__FILE__) . DS . '..' . DS . 'lib' . DS . 'rtcachecleaner.class.php';
$action = JRequest::getString('action', null);
if ($action == 'clean') {
    RTCacheClean::clean();
}
//return count
echo RTCacheClean::getCount();
?>

示例#2
0
 function _getTools()
 {
     $user =& JFactory::getUser();
     // cache some acl checks
     $canCheckin = $user->authorise('core.admin', 'com_checkin');
     $canCache = $user->authorise('core.manage', 'com_cache');
     $canAdmin = $user->authorise('core.admin');
     if ($canCheckin || $canCache || $canAdmin) {
         $tools = array();
         if ($canCheckin) {
             //index.php?process=ajax&model=quickcheckin
             require_once 'rtcheckin.class.php';
             if ($this->params->get('enableQuickCheckin', 0)) {
                 $tools[] = $this->_addListItem(JText::_('MC_QUICK_CHECKIN'), 'qci', '#', '<span class="badge number">' . RTCheckin::getCheckouts(true) . '</span>');
             }
             $tools[] = $this->_addListItem(JText::_('MC_CHECKIN_MANAGER'), 'checkin', 'index.php?option=com_checkin');
             $tools[] = $this->_addListItem('___');
         }
         if ($canCache) {
             // index.php?process=ajax&model=quickcachecleaner
             require_once 'rtcachecleaner.class.php';
             if ($this->params->get('enableQuickCacheClean', 1)) {
                 $tools[] = $this->_addListItem(JText::_('MC_QUICK_CACHE_CLEAN'), 'qcc', '#', '<span class="badge number">' . RTCacheClean::getCount() . '</span>');
             }
             $tools[] = $this->_addListItem(JText::_('MC_CACHE_MANAGER'), 'config', 'index.php?option=com_cache');
             $tools[] = $this->_addListItem(JText::_('MC_PURGE_EXPIRED_CACHE'), 'config', 'index.php?option=com_cache&view=purge');
             $tools[] = $this->_addListItem('___');
         }
         if ($canAdmin) {
             $tools[] = $this->_addListItem(JText::_('MC_SYS_INFO'), 'sysinfo', 'index.php?option=com_admin&view=sysinfo');
         }
         return $this->_listify($tools, 'mc-dropdown');
     }
     return false;
 }