Файловый менеджер - Редактировать - /home/lmsyaran/public_html/pusher/com_cache.zip
Назад
PK %�[-��< < access.xmlnu �[��� <?xml version="1.0" encoding="utf-8" ?> <access component="com_cache"> <section name="component"> <action name="core.admin" title="JACTION_ADMIN" description="JACTION_ADMIN_COMPONENT_DESC" /> <action name="core.manage" title="JACTION_MANAGE" description="JACTION_MANAGE_COMPONENT_DESC" /> </section> </access> PK %�[�s@1 1 cache.phpnu �[��� <?php /** * @package Joomla.Administrator * @subpackage com_cache * * @copyright (C) 2005 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; if (!JFactory::getUser()->authorise('core.manage', 'com_cache')) { throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403); } $controller = JControllerLegacy::getInstance('Cache'); $controller->execute(JFactory::getApplication()->input->get('task')); $controller->redirect(); PK %�[I1� � cache.xmlnu �[��� <?xml version="1.0" encoding="utf-8"?> <extension type="component" version="3.1" method="upgrade"> <name>com_cache</name> <author>Joomla! Project</author> <creationDate>April 2006</creationDate> <copyright>(C) 2006 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.0.0</version> <description>COM_CACHE_XML_DESCRIPTION</description> <administration> <files folder="admin"> <filename>cache.php</filename> <filename>config.xml</filename> <filename>controller.php</filename> <folder>models</folder> <folder>views</folder> </files> <languages folder="admin"> <language tag="en-GB">language/en-GB.com_cache.ini</language> <language tag="en-GB">language/en-GB.com_cache.sys.ini</language> </languages> </administration> </extension> PK %�[n}�_ _ config.xmlnu �[��� <?xml version="1.0" encoding="utf-8"?> <config> <fieldset name="permissions" label="JCONFIG_PERMISSIONS_LABEL" description="JCONFIG_PERMISSIONS_DESC" > <field name="rules" type="rules" label="JCONFIG_PERMISSIONS_LABEL" filter="rules" validate="rules" component="com_cache" section="component" /> </fieldset> </config> PK %�[֕6� � controller.phpnu �[��� <?php /** * @package Joomla.Administrator * @subpackage com_cache * * @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Cache Controller * * @since 1.6 */ class CacheController extends JControllerLegacy { /** * Display a view. * * @param boolean $cachable If true, the view output will be cached * @param array $urlparams An array of safe URL parameters and their variable types, for valid values see {@link JFilterInput::clean()}. * * @return JController This object to support chaining. * * @since 1.5 */ public function display($cachable = false, $urlparams = false) { JLoader::register('CacheHelper', JPATH_ADMINISTRATOR . '/components/com_cache/helpers/cache.php'); // Get the document object. $document = JFactory::getDocument(); // Set the default view name and format from the Request. $vName = $this->input->get('view', 'cache'); $vFormat = $document->getType(); $lName = $this->input->get('layout', 'default', 'string'); // Get and render the view. if ($view = $this->getView($vName, $vFormat)) { switch ($vName) { case 'purge': break; case 'cache': default: $model = $this->getModel($vName); $view->setModel($model, true); break; } $view->setLayout($lName); // Push document object into the view. $view->document = $document; // Load the submenu. CacheHelper::addSubmenu($this->input->get('view', 'cache')); $view->display(); } } /** * Method to delete a list of cache groups. * * @return void */ public function delete() { // Check for request forgeries $this->checkToken(); $cid = (array) $this->input->post->get('cid', array(), 'string'); if (empty($cid)) { JFactory::getApplication()->enqueueMessage(JText::_('JERROR_NO_ITEMS_SELECTED'), 'warning'); } else { $result = $this->getModel('cache')->cleanlist($cid); if ($result !== array()) { JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_CACHE_EXPIRED_ITEMS_DELETE_ERROR', implode(', ', $result)), 'error'); } else { JFactory::getApplication()->enqueueMessage(JText::_('COM_CACHE_EXPIRED_ITEMS_HAVE_BEEN_DELETED'), 'message'); } } $this->setRedirect('index.php?option=com_cache'); } /** * Method to delete all cache groups. * * @return void * * @since 3.6.0 */ public function deleteAll() { // Check for request forgeries $this->checkToken(); $app = JFactory::getApplication(); $model = $this->getModel('cache'); $allCleared = true; $clients = array(1, 0); foreach ($clients as $client) { $mCache = $model->getCache($client); $clientStr = JText::_($client ? 'JADMINISTRATOR' : 'JSITE') .' > '; foreach ($mCache->getAll() as $cache) { if ($mCache->clean($cache->group) === false) { $app->enqueueMessage(JText::sprintf('COM_CACHE_EXPIRED_ITEMS_DELETE_ERROR', $clientStr . $cache->group), 'error'); $allCleared = false; } } } if ($allCleared) { $app->enqueueMessage(JText::_('COM_CACHE_MSG_ALL_CACHE_GROUPS_CLEARED'), 'message'); } else { $app->enqueueMessage(JText::_('COM_CACHE_MSG_SOME_CACHE_GROUPS_CLEARED'), 'warning'); } $app->triggerEvent('onAfterPurge', array()); $this->setRedirect('index.php?option=com_cache&view=cache'); } /** * Purge the cache. * * @return void */ public function purge() { // Check for request forgeries $this->checkToken(); if (!$this->getModel('cache')->purge()) { JFactory::getApplication()->enqueueMessage(JText::_('COM_CACHE_EXPIRED_ITEMS_PURGING_ERROR'), 'error'); } else { JFactory::getApplication()->enqueueMessage(JText::_('COM_CACHE_EXPIRED_ITEMS_HAVE_BEEN_PURGED'), 'message'); } $this->setRedirect('index.php?option=com_cache&view=purge'); } } PK %�[��b b helpers/cache.phpnu �[��� <?php /** * @package Joomla.Administrator * @subpackage com_cache * * @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Cache component helper. * * @since 1.6 */ class CacheHelper { /** * Get a list of filter options for the application clients. * * @return array An array of JHtmlOption elements. * * @deprecated 4.0 No replacement. */ public static function getClientOptions() { // Build the filter options. $options = array(); $options[] = JHtml::_('select.option', '0', JText::_('JSITE')); $options[] = JHtml::_('select.option', '1', JText::_('JADMINISTRATOR')); return $options; } /** * Configure the Linkbar. * * @param string $vName The name of the active view. * * @return void * * @since 1.6 */ public static function addSubmenu($vName) { JHtmlSidebar::addEntry( JText::_('JGLOBAL_SUBMENU_CHECKIN'), 'index.php?option=com_checkin', $vName == 'com_checkin' ); JHtmlSidebar::addEntry( JText::_('JGLOBAL_SUBMENU_CLEAR_CACHE'), 'index.php?option=com_cache', $vName == 'cache' ); JHtmlSidebar::addEntry( JText::_('JGLOBAL_SUBMENU_PURGE_EXPIRED_CACHE'), 'index.php?option=com_cache&view=purge', $vName == 'purge' ); } } PK %�[�(��d d models/cache.phpnu �[��� <?php /** * @package Joomla.Administrator * @subpackage com_cache * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\Utilities\ArrayHelper; /** * Cache Model * * @since 1.6 */ class CacheModelCache extends JModelList { /** * An Array of CacheItems indexed by cache group ID * * @var Array */ protected $_data = array(); /** * Group total * * @var integer */ protected $_total = null; /** * Pagination object * * @var object */ protected $_pagination = null; /** * Constructor. * * @param array $config An optional associative array of configuration settings. * * @since 3.5 */ public function __construct($config = array()) { if (empty($config['filter_fields'])) { $config['filter_fields'] = array( 'group', 'count', 'size', 'client_id', ); } parent::__construct($config); } /** * Method to auto-populate the model state. * * Note. Calling getState in this method will result in recursion. * * @param string $ordering Field for ordering. * @param string $direction Direction of ordering. * * @return void * * @since 1.6 */ protected function populateState($ordering = 'group', $direction = 'asc') { // Load the filter state. $this->setState('filter.search', $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search', '', 'string')); // Special case for client id. $clientId = (int) $this->getUserStateFromRequest($this->context . '.client_id', 'client_id', 0, 'int'); $clientId = (!in_array($clientId, array (0, 1))) ? 0 : $clientId; $this->setState('client_id', $clientId); parent::populateState($ordering, $direction); } /** * Method to get a store id based on model configuration state. * * This is necessary because the model is used by the component and * different modules that might need different sets of data or different * ordering requirements. * * @param string $id A prefix for the store id. * * @return string A store id. * * @since 3.5 */ protected function getStoreId($id = '') { // Compile the store id. $id .= ':' . $this->getState('client_id'); $id .= ':' . $this->getState('filter.search'); return parent::getStoreId($id); } /** * Method to get cache data * * @return array */ public function getData() { if (empty($this->_data)) { try { $cache = $this->getCache(); $data = $cache->getAll(); if ($data && count($data) > 0) { // Process filter by search term. if ($search = $this->getState('filter.search')) { foreach ($data as $key => $cacheItem) { if (stripos($cacheItem->group, $search) === false) { unset($data[$key]); continue; } } } // Process ordering. $listOrder = $this->getState('list.ordering', 'group'); $listDirn = $this->getState('list.direction', 'ASC'); $this->_data = ArrayHelper::sortObjects($data, $listOrder, strtolower($listDirn) === 'desc' ? -1 : 1, true, true); // Process pagination. $limit = (int) $this->getState('list.limit', 25); if ($limit !== 0) { $start = (int) $this->getState('list.start', 0); return array_slice($this->_data, $start, $limit); } } else { $this->_data = array(); } } catch (JCacheExceptionConnecting $exception) { $this->setError(JText::_('COM_CACHE_ERROR_CACHE_CONNECTION_FAILED')); $this->_data = array(); } catch (JCacheExceptionUnsupported $exception) { $this->setError(JText::_('COM_CACHE_ERROR_CACHE_DRIVER_UNSUPPORTED')); $this->_data = array(); } } return $this->_data; } /** * Method to get cache instance. * * @return JCacheController */ public function getCache($clientId = null) { $conf = JFactory::getConfig(); if (is_null($clientId)) { $clientId = $this->getState('client_id'); } $options = array( 'defaultgroup' => '', 'storage' => $conf->get('cache_handler', ''), 'caching' => true, 'cachebase' => (int) $clientId === 1 ? JPATH_ADMINISTRATOR . '/cache' : $conf->get('cache_path', JPATH_SITE . '/cache') ); return JCache::getInstance('', $options); } /** * Method to get client data. * * @return array * * @deprecated 4.0 No replacement. */ public function getClient() { return JApplicationHelper::getClientInfo($this->getState('client_id', 0)); } /** * Get the number of current Cache Groups. * * @return integer */ public function getTotal() { if (empty($this->_total)) { $this->_total = count($this->getData()); } return $this->_total; } /** * Method to get a pagination object for the cache. * * @return JPagination */ public function getPagination() { if (empty($this->_pagination)) { $this->_pagination = new JPagination($this->getTotal(), $this->getState('list.start'), $this->getState('list.limit')); } return $this->_pagination; } /** * Clean out a cache group as named by param. * If no param is passed clean all cache groups. * * @param string $group Cache group name. * * @return boolean True on success, false otherwise */ public function clean($group = '') { try { $this->getCache()->clean($group); } catch (JCacheExceptionConnecting $exception) { return false; } catch (JCacheExceptionUnsupported $exception) { return false; } Factory::getApplication()->triggerEvent('onAfterPurge', array($group)); return true; } /** * Purge an array of cache groups. * * @param array $array Array of cache group names. * * @return array Array with errors, if they exist. */ public function cleanlist($array) { $errors = array(); foreach ($array as $group) { if (!$this->clean($group)) { $errors[] = $group; } } return $errors; } /** * Purge all cache items. * * @return boolean True if successful; false otherwise. */ public function purge() { try { JFactory::getCache('')->gc(); } catch (JCacheExceptionConnecting $exception) { return false; } catch (JCacheExceptionUnsupported $exception) { return false; } Factory::getApplication()->triggerEvent('onAfterPurge', array()); return true; } } PK %�[�}�_� � models/forms/filter_cache.xmlnu �[��� <?xml version="1.0" encoding="utf-8"?> <form> <field name="client_id" type="list" onchange="jQuery('#filter_search, select[id^=filter_], #list_fullordering').val('');this.form.submit();" filtermode="selector" > <option value="0">JSITE</option> <option value="1">JADMINISTRATOR</option> </field> <fields name="filter"> <field name="search" type="text" inputmode="search" label="COM_CACHE_FILTER_SEARCH_LABEL" description="COM_CACHE_FILTER_SEARCH_DESC" hint="JSEARCH_FILTER" noresults="JGLOBAL_NO_MATCHING_RESULTS" /> </fields> <fields name="list"> <field name="fullordering" type="list" label="JGLOBAL_SORT_BY" description="JGLOBAL_SORT_BY" onchange="this.form.submit();" default="group ASC" validate="options" > <option value="">JGLOBAL_SORT_BY</option> <option value="group ASC">COM_CACHE_HEADING_GROUP_ASC</option> <option value="group DESC">COM_CACHE_HEADING_GROUP_DESC</option> <option value="count ASC">COM_CACHE_HEADING_COUNT_ASC</option> <option value="count DESC">COM_CACHE_HEADING_COUNT_DESC</option> <option value="size ASC">COM_CACHE_HEADING_SIZE_ASC</option> <option value="size DESC">COM_CACHE_HEADING_SIZE_DESC</option> </field> <field name="limit" type="limitbox" label="JGLOBAL_LIMIT" description="JGLOBAL_LIMIT" class="input-mini" default="25" onchange="this.form.submit();" /> </fields> </form> PK %�[��� � views/cache/tmpl/default.phpnu �[��� <?php /** * @package Joomla.Administrator * @subpackage com_cache * * @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JHtml::_('formbehavior.chosen', 'select'); JHtml::_('bootstrap.tooltip'); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); ?> <form action="<?php echo JRoute::_('index.php?option=com_cache'); ?>" method="post" name="adminForm" id="adminForm"> <?php if (!empty($this->sidebar)) : ?> <div id="j-sidebar-container" class="span2"> <?php echo $this->sidebar; ?> </div> <div id="j-main-container" class="span10"> <?php else : ?> <div id="j-main-container"> <?php endif; ?> <?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?> <?php if ($this->total > 0) : ?> <table class="table table-striped"> <thead> <tr> <th width="1%" class="nowrap center"> <?php echo JHtml::_('grid.checkall'); ?> </th> <th class="title nowrap"> <?php echo JHtml::_('searchtools.sort', 'COM_CACHE_GROUP', 'group', $listDirn, $listOrder); ?> </th> <th width="5%" class="nowrap"> <?php echo JHtml::_('searchtools.sort', 'COM_CACHE_NUMBER_OF_FILES', 'count', $listDirn, $listOrder); ?> </th> <th width="10%" class="nowrap"> <?php echo JHtml::_('searchtools.sort', 'COM_CACHE_SIZE', 'size', $listDirn, $listOrder); ?> </th> </tr> </thead> <tfoot> <tr> <td colspan="4"> <?php echo $this->pagination->getListFooter(); ?> </td> </tr> </tfoot> <tbody> <?php $i = 0; foreach ($this->data as $folder => $item) : ?> <tr class="row<?php echo $i % 2; ?>"> <td> <input type="checkbox" id="cb<?php echo $i; ?>" name="cid[]" value="<?php echo $this->escape($item->group); ?>" onclick="Joomla.isChecked(this.checked);" /> </td> <td> <label for="cb<?php echo $i; ?>"> <strong><?php echo $this->escape($item->group); ?></strong> </label> </td> <td> <?php echo $item->count; ?> </td> <td> <?php echo JHtml::_('number.bytes', $item->size); ?> </td> </tr> <?php $i++; endforeach; ?> </tbody> </table> <?php endif; ?> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> <?php echo JHtml::_('form.token'); ?> </div> </form> PK %�[pp�� � views/cache/tmpl/default.xmlnu ȯ�� <?xml version="1.0" encoding="utf-8"?> <metadata> <layout title="COM_CACHE_CACHE_VIEW_DEFAULT_TITLE"> <message> <![CDATA[COM_CACHE_CACHE_VIEW_DEFAULT_DESC]]> </message> </layout> </metadata> PK %�[_J(� � views/cache/view.html.phpnu �[��� <?php /** * @package Joomla.Administrator * @subpackage com_cache * * @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML View class for the Cache component * * @since 1.6 */ class CacheViewCache extends JViewLegacy { /** * @var object client object. * @deprecated 4.0 */ protected $client; protected $data; protected $pagination; protected $state; /** * Display a view. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { $this->data = $this->get('Data'); $this->pagination = $this->get('Pagination'); $this->total = $this->get('Total'); $this->state = $this->get('State'); $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors), 500); } $this->addToolbar(); $this->sidebar = JHtmlSidebar::render(); parent::display($tpl); } /** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { $state = $this->get('State'); if ($state->get('client_id') == 1) { JToolbarHelper::title(JText::_('COM_CACHE_CLEAR_CACHE_ADMIN_TITLE'), 'lightning clear'); } else { JToolbarHelper::title(JText::_('COM_CACHE_CLEAR_CACHE_SITE_TITLE'), 'lightning clear'); } JToolbarHelper::custom('delete', 'delete.png', 'delete_f2.png', 'JTOOLBAR_DELETE', true); JToolbarHelper::custom('deleteAll', 'remove.png', 'delete_f2.png', 'JTOOLBAR_DELETE_ALL', false); JToolbarHelper::divider(); if (JFactory::getUser()->authorise('core.admin', 'com_cache')) { JToolbarHelper::preferences('com_cache'); } JToolbarHelper::divider(); JToolbarHelper::help('JHELP_SITE_MAINTENANCE_CLEAR_CACHE'); JHtmlSidebar::setAction('index.php?option=com_cache'); } } PK &�[=�[�� � views/purge/tmpl/default.phpnu �[��� <?php /** * @package Joomla.Administrator * @subpackage com_cache * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> <form action="<?php echo JRoute::_('index.php?option=com_cache&view=purge'); ?>" method="post" name="adminForm" id="adminForm"> <div id="j-sidebar-container" class="span2"> <?php echo $this->sidebar; ?> </div> <div id="j-main-container" class="span10"> <p><?php echo JText::_('COM_CACHE_PURGE_INSTRUCTIONS'); ?></p> <input type="hidden" name="task" value="" /> <?php echo JHtml::_('form.token'); ?> </div> </form> PK &�[��X� � views/purge/tmpl/default.xmlnu ȯ�� <?xml version="1.0" encoding="utf-8"?> <metadata> <layout title="COM_CACHE_PURGE_VIEW_DEFAULT_TITLE"> <message> <![CDATA[COM_CACHE_PURGE_VIEW_DEFAULT_DESC]]> </message> </layout> </metadata> PK &�[��x� � views/purge/view.html.phpnu �[��� <?php /** * @package Joomla.Administrator * @subpackage com_cache * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML View class for the Cache component * * @since 1.6 */ class CacheViewPurge extends JViewLegacy { /** * Display a view. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { JFactory::getApplication()->enqueueMessage(JText::_('COM_CACHE_RESOURCE_INTENSIVE_WARNING'), 'warning'); $this->addToolbar(); $this->sidebar = JHtmlSidebar::render(); parent::display($tpl); } /** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { JToolbarHelper::title(JText::_('COM_CACHE_PURGE_EXPIRED_CACHE'), 'lightning purge'); JToolbarHelper::custom('purge', 'delete.png', 'delete_f2.png', 'COM_CACHE_PURGE_EXPIRED', false); JToolbarHelper::divider(); if (JFactory::getUser()->authorise('core.admin', 'com_cache')) { JToolbarHelper::preferences('com_cache'); JToolbarHelper::divider(); } JToolbarHelper::help('JHELP_SITE_MAINTENANCE_PURGE_EXPIRED_CACHE'); } } PK %�[-��< < access.xmlnu �[��� PK %�[�s@1 1 v cache.phpnu �[��� PK %�[I1� � � cache.xmlnu �[��� PK %�[n}�_ _ � config.xmlnu �[��� PK %�[֕6� � T controller.phpnu �[��� PK %�[��b b helpers/cache.phpnu �[��� PK %�[�(��d d � models/cache.phpnu �[��� PK %�[�}�_� � `8 models/forms/filter_cache.xmlnu �[��� PK %�[��� � E>