Beispiel #1
0
    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;
    }
Beispiel #2
0
 public function getRequest()
 {
     $request = parent::getRequest();
     if ($request->query->Itemid) {
         $request->query->page = $request->query->Itemid;
     }
     return $request;
 }
Beispiel #3
0
 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;
 }
Beispiel #4
0
 protected function _initialize(KObjectConfig $config)
 {
     $config->append(array('controller' => 'dashboard'));
     parent::_initialize($config);
 }
Beispiel #5
0
 protected function _actionSend(KDispatcherContextInterface $context)
 {
     if (!$context->getRequest()->isGet() || $context->getResponse()->getContentType() !== 'text/html') {
         return parent::_actionSend($context);
     }
 }