Exemplo n.º 1
0
 public function _setup()
 {
     parent::_setup();
     if ($this->session->get('Foresmo_username', false) === false || !$this->session->get('Foresmo_username')) {
         $this->_redirect('/login');
     }
     $this->_layout_default = 'admin';
 }
Exemplo n.º 2
0
 protected function _postRun()
 {
     parent::_postRun();
     if (isset($this->_registered_hooks['_postRun'][$this->_controller][$this->_action])) {
         $hooks = $this->_registered_hooks['_postRun'][$this->_controller][$this->_action];
         foreach ($hooks as $module => $module_call) {
             $module_obj = Solar::factory("Foresmo_Modules_{$module}", $this->_model);
             if (method_exists($module_obj, $module_call)) {
                 $module_obj->{$module_call}();
             }
         }
     }
     $this->session->setFlash('redirect', array('controller' => $this->_controller, 'action' => $this->_action, 'params' => $this->_info));
 }
Exemplo n.º 3
0
 /**
  * _preRun
  * Insert description here
  *
  *
  * @return
  *
  * @access
  * @static
  * @see
  * @since
  */
 protected function _preRun()
 {
     parent::_preRun();
     $module_info = $this->_model->modules->fetchModuleInfoByName('Search');
     if (isset($module_info['moduleinfo'])) {
         foreach ($module_info['moduleinfo'] as $row) {
             if ($row['name'] == 'search_adapter') {
                 $this->search_adapter = ucfirst(strtolower($row['value']));
             }
             if ($row['name'] == 'search_adapter_settings') {
                 $this->search_adapter_settings = unserialize($row['value']);
             }
         }
     }
     if (isset($this->search_adapter_settings[$this->search_adapter])) {
         $this->search_adapter_settings = $this->search_adapter_settings[$this->search_adapter];
     }
 }
Exemplo n.º 4
0
 /**
  * _postRun
  * Insert description here
  * @return
  */
 protected function _postRun()
 {
     parent::_postRun();
 }