public function getRequest() { $request = parent::getRequest(); $query = $request->query; if ($query->alias && !$query->slug) { $parts = explode('-', $query->alias, 2); $query->slug = array_pop($parts); } $menu = JFactory::getApplication()->getMenu()->getActive(); if ($menu && !in_array($query->view, array('doclink', 'documents'))) { $query->Itemid = $menu->id; } // Can't use executable behavior here as it calls getController which in turn calls this method if ($this->getObject('user')->authorise('core.manage', 'com_docman') !== true) { $query->enabled = 1; $query->status = 'published'; } // Force tmpl=koowa for form layouts if ($query->layout === 'form' && $query->view !== 'submit') { $query->tmpl = 'koowa'; } $query->access = $this->getObject('user')->getRoles(); $query->page = $query->Itemid; $query->current_user = $this->getObject('user')->getId(); return $request; }
public function getRequest() { $request = parent::getRequest(); if ($request->query->Itemid) { $request->query->page = $request->query->Itemid; } return $request; }
public function getRequest() { $request = parent::getRequest(); $query = $request->query; // Can't use executable behavior here as it calls getController which in turn calls this method if ($this->getObject('user')->authorise('core.manage', 'com_todo') !== true) { $query->enabled = 1; } else { // force 0+1 so the state is set with the right values - see Nooku #174 $query->enabled = array(0, 1); } // Force tmpl=koowa for form layouts if ($query->layout === 'form') { $query->tmpl = 'koowa'; } return $request; }