public function php() { parent::checkAuthentification(); parent::checkIfAdmin(); $entries = LogEntry::find('log', 'php'); if ($entries == NULL) { $entries = array(); } else { if ($entries instanceof LogEntry) { $entries = array($entries); } } usort($entries, array('LogEntry', 'compare')); $smarty = new Template(); $smarty->assign('entries', $entries); $smarty->assign('title', System::getLanguage()->_('Log')); $smarty->assign('heading', System::getLanguage()->_('PHPEntries')); $smarty->assign('showPHPEntries', true); $smarty->display('log/log.tpl'); }
protected function onBefore($action = '') { parent::checkAuthentification(); }
public function getFile() { System::$isXHR = true; parent::checkAuthentification(); $response = new AjaxResponse(); $file = File::find('_id', $this->getRequestParam('file_id', NULL)); if ($file != NULL) { $response->success = true; $response->data = $file->toJSON(); } else { $response->success = false; $response->message = System::getLanguage()->_('ErrorFileNotFound'); } $response->send(); }