/** * Override Execute Method * * @return void */ public function execute() { //get the cname, active tab, and action for plugins $this->cn = Request::getVar('cn', ''); $this->active = Request::getVar('active', ''); $this->action = Request::getVar('action', ''); $this->task = Request::getVar('task', ''); // Handles misrouted request if ($this->task == 'pages') { App::redirect(Route::url('index.php?option=' . $this->_option . '&cn=' . $this->cn . '&controller=pages')); } //are we serving up a file $uri = $_SERVER['REQUEST_URI']; if (strstr($uri, 'Image:')) { $file = strstr($uri, 'Image:'); } elseif (strstr($uri, 'File:')) { $file = strstr($uri, 'File:'); } //if we have a file if (isset($file)) { return $this->downloadTask($file); } // check in for user Helpers\Pages::checkinForUser(); //continue with parent execute method parent::execute(); }
/** * Override Execute Method * * @return void */ public function execute() { //get the cname, active tab, and action for plugins $this->cn = Request::getVar('cn', ''); $this->active = Request::getVar('active', ''); $this->action = Request::getVar('action', ''); //are we serving up a file $uri = $_SERVER['REQUEST_URI']; if (strstr($uri, 'Image:')) { $file = strstr($uri, 'Image:'); } elseif (strstr($uri, 'File:')) { $file = strstr($uri, 'File:'); } //if we have a file if (isset($file)) { return $this->downloadTask($file); } // check in for user Helpers\Pages::checkinForUser(); //continue with parent execute method parent::execute(); }
/** * Display Group Pages * * @return void */ public function displayTask() { // check in for user Helpers\Pages::checkinForUser(); // get group pages $pageArchive = new Page\Archive(); $this->view->pages = $pageArchive->pages('tree', array('gidNumber' => $this->group->get('gidNumber'), 'state' => array(0, 1), 'orderby' => 'lft ASC')); // get page categories $categoryArchive = new Page\Category\Archive(); $this->view->categories = $categoryArchive->categories('list', array('gidNumber' => $this->group->get('gidNumber'), 'orderby' => 'title')); // get modules archive $moduleArchive = new Module\Archive(); $this->view->modules = $moduleArchive->modules('list', array('gidNumber' => $this->group->get('gidNumber'), 'state' => array(0, 1), 'orderby' => 'position ASC, ordering ASC')); // get request vars $this->view->search = Request::getWord('search', ''); $this->view->filter = Request::getInt('filer', 0); //build pathway $this->_buildPathway(); //build title $this->_buildTitle(); //set view vars $this->view->title = Lang::txt('COM_GROUPS_PAGES_MANAGE') . ': ' . $this->group->get('description'); // get view notifications $this->view->notifications = $this->getNotifications(); $this->view->notifications = $this->view->notifications ? $this->view->notifications : array(); $this->view->group = $this->group; $this->view->config = $this->config; //display $this->view->setLayout('manager'); $this->view->display(); }