芝麻web文件管理V1.00
编辑当前文件:/home/asmplong/www/ancien-site-2019/site/administrator/components/com_cache/controller.php
getType(); $lName = JRequest::getCmd('layout', 'default'); // 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->assignRef('document', $document); // Load the submenu. CacheHelper::addSubmenu(JRequest::getCmd('view', 'cache')); $view->display(); } } public function delete() { // Check for request forgeries JRequest::checkToken() or jexit(JText::_('JInvalid_Token')); $cid = JRequest::getVar('cid', array(), 'post', 'array'); $model = $this->getModel('cache'); if(empty($cid)) { JError::raiseWarning(500, JText::_('JERROR_NO_ITEMS_SELECTED')); } else { $model->cleanlist($cid); } $this->setRedirect('index.php?option=com_cache&client='.$model->getClient()->id); } public function purge() { // Check for request forgeries JRequest::checkToken() or jexit(JText::_('JInvalid_Token')); $model = $this->getModel('cache'); $ret = $model->purge(); $msg = JText::_('COM_CACHE_EXPIRED_ITEMS_HAVE_BEEN_PURGED'); $msgType = 'message'; if ($ret === false) { $msg = JText::_('Error purging expired items'); $msgType = 'error'; } $this->setRedirect('index.php?option=com_cache&view=purge', $msg, $msgType); } }