Пример #1
0
 /**
  */
 public function execute()
 {
     switch ($this->_task) {
         case 'clean':
             SPFactory::cache()->cleanSection();
             $this->response(Sobi::Back(), Sobi::Txt('MSG.CACHE_CLEANED'), false, SPC::SUCCESS_MSG);
             break;
         case 'saveOrdering':
             $this->saveDefaultOrdering();
             break;
         case 'crawler':
             $this->crawler();
             break;
         case 'fields':
             $this->fields();
             break;
         case 'saveRejectionTpl':
             $this->saveRejectionTpl();
             break;
         case 'rejectionTemplates':
             $this->rejectionTemplates();
             break;
         case 'deleteRejectionTemplate':
             $this->deleteRejectionTemplate();
             break;
         default:
             /* case plugin didn't registered this task, it was an error */
             if (!parent::execute() && !$this->view()) {
                 Sobi::Error($this->name(), SPLang::e('SUCH_TASK_NOT_FOUND', SPRequest::task()), SPC::NOTICE, 404, __LINE__, __FILE__);
             } else {
                 return true;
             }
             break;
     }
 }
Пример #2
0
 /**
  */
 public function execute()
 {
     $r = false;
     switch ($this->_task) {
         case 'search':
             $this->search();
             break;
         default:
             /* case plugin didn't registered this task, it was an error */
             if (!parent::execute()) {
                 Sobi::Error($this->name(), SPLang::e('SUCH_TASK_NOT_FOUND', SPRequest::task()), SPC::NOTICE, 404, __LINE__, __FILE__);
             } else {
                 $r = true;
             }
             break;
     }
     return $r;
 }
Пример #3
0
 /**
  */
 public function execute()
 {
     /* parent class executes the plugins */
     SPRequest::set('task', $this->_type . '.' . $this->_task);
     switch ($this->_task) {
         case 'front':
             $this->getSections();
             /** @var $view SPAdmPanelView */
             $view = SPFactory::View('front');
             /* load template config */
             //				$this->tplCfg( 'front' );
             //				$view->setConfig( $this->_tCfg, 'general' );
             $view->determineTemplate('front', SPC::DEFAULT_TEMPLATE);
             $view->assign($this->_sections, 'sections');
             $view->display();
             break;
         default:
             /* case parents or plugin didn't registered this task, it was an error */
             if (!parent::execute()) {
                 Sobi::Error($this->name(), SPLang::e('SUCH_TASK_NOT_FOUND', SPRequest::task()), SPC::NOTICE, 404, __LINE__, __FILE__);
             }
             break;
     }
 }
Пример #4
0
 /**
  */
 public function execute()
 {
     switch ($this->_task) {
         case 'panel':
             $this->getSections();
             /** @var $view SPAdmPanelView */
             $view = SPFactory::View('front', true)->assign($acl, 'acl')->assign($this->_sections, 'sections')->assign($this->getNews(), 'news')->assign(Sobi::GetUserState('sections.order', 'order', 'name.asc'), 'order')->assign(SPFactory::CmsHelper()->myVersion(true), 'version')->assign(Sobi::Cfg('cpanel.show_entries', false), 'show-entries')->assign($this->getState(), 'system-state');
             if (Sobi::Cfg('cpanel.show_entries', false)) {
                 $view->assign($this->getEntries(), 'entries');
             }
             SPLang::load('com_sobipro.about');
             $view->determineTemplate('front', 'cpanel');
             Sobi::Trigger('Panel', 'View', array(&$view));
             $view->display();
             break;
         default:
             /* case plugin didn't registered this task, it was an error */
             if (!parent::execute()) {
                 Sobi::Error($this->name(), SPLang::e('SUCH_TASK_NOT_FOUND', SPRequest::task()), SPC::NOTICE, 404, __LINE__, __FILE__);
             }
             break;
     }
 }
Пример #5
0
 /**
  * @param int $sid
  * @param bool $redirect
  * @return void
  */
 protected function checkIn($sid, $redirect = true)
 {
     parent::checkIn(SPRequest::int('entry_id', $sid, 'request', true), $redirect);
 }