/** * Display all pages in the wiki(s) * * @return void */ public function displayTask() { $this->view->filters = array('authorized' => true, 'limit' => Request::getState($this->_option . '.' . $this->_controller . '.limit', 'limit', Config::get('list_limit'), 'int'), 'start' => Request::getState($this->_option . '.' . $this->_controller . '.limitstart', 'limitstart', 0, 'int'), 'sort' => Request::getState($this->_option . '.' . $this->_controller . '.sort', 'filter_order', 'id'), 'sort_Dir' => Request::getState($this->_option . '.' . $this->_controller . '.sortdir', 'filter_order_Dir', 'ASC'), 'search' => Request::getState($this->_option . '.' . $this->_controller . '.search', 'search', ''), 'namespace' => Request::getState($this->_option . '.' . $this->_controller . '.namespace', 'namespace', ''), 'group' => Request::getState($this->_option . '.' . $this->_controller . '.group', 'group', ''), 'state' => array(0, 1, 2)); $this->view->filters['sortby'] = $this->view->filters['sort'] . ' ' . $this->view->filters['sort_Dir']; // In case limit has been changed, adjust limitstart accordingly $this->view->filters['start'] = $this->view->filters['limit'] != 0 ? floor($this->view->filters['start'] / $this->view->filters['limit']) * $this->view->filters['limit'] : 0; $p = new Book(); // Get record count $this->view->total = $p->pages('count', $this->view->filters); // Get records $this->view->rows = $p->pages('list', $this->view->filters); $this->view->groups = $p->groups(); // Set any errors foreach ($this->getErrors() as $error) { $this->view->setError($error); } // Output the HTML $this->view->display(); }