Esempio n. 1
0
 public function __construct($request)
 {
     parent::__construct($request);
     $this->target_controller = $this->request->get('target_controller');
     $this->target_subject = $this->request->get('target_subject');
     $this->target_id = $this->request->get('target_id');
 }
Esempio n. 2
0
 public function parseRoute($uri)
 {
     $action_name = parent::parseRoute($uri);
     if (!$action_name && $this->cms_config->ctype_default) {
         $action_name = parent::parseRoute($this->cms_config->ctype_default . '/' . $uri);
     }
     return $action_name;
 }
Esempio n. 3
0
 public function parseRoute($uri)
 {
     $config = cmsConfig::getInstance();
     $action_name = parent::parseRoute($uri);
     if (!$action_name && $config->ctype_default) {
         $action_name = parent::parseRoute($config->ctype_default . '/' . $uri);
     }
     return $action_name;
 }
Esempio n. 4
0
 public function before($action_name)
 {
     if (!cmsUser::isAdmin()) {
         cmsCore::error404();
     }
     parent::before($action_name);
     $template = cmsTemplate::getInstance();
     $template->setLayout('admin');
     $template->setMenuItems('cp_main', $this->getAdminMenu());
 }
Esempio n. 5
0
 public function before($action_name)
 {
     if (!cmsUser::isAdmin()) {
         cmsCore::error404();
     }
     if (!$this->isAllowByIp()) {
         cmsCore::error404();
     }
     parent::before($action_name);
     $this->cms_template->setLayout('admin');
     $this->cms_template->setMenuItems('cp_main', $this->getAdminMenu());
 }
Esempio n. 6
0
 /**
  * Все запросы могут быть выполнены только авторизованными и только по аякс
  * @param type $action_name
  */
 public function before($action_name)
 {
     parent::before($action_name);
     if (!$this->request->isInternal()) {
         if (!$this->request->isAjax()) {
             cmsCore::error404();
         }
         if (!cmsUser::isLogged()) {
             cmsCore::error404();
         }
     }
     return true;
 }
Esempio n. 7
0
 public function getOptions()
 {
     $options = parent::getOptions();
     if (!empty($options['no_redirect_list'])) {
         $no_redirect_list = explode("\n", $options['no_redirect_list']);
         $options['no_redirect_list_array'] = array_map(function ($val) {
             return trim($val);
         }, $no_redirect_list);
     }
     if (!empty($options['black_list'])) {
         $black_list = explode("\n", $options['black_list']);
         $options['black_list_array'] = array_map(function ($val) {
             return trim($val);
         }, $black_list);
     }
     if (!empty($options['white_list'])) {
         $white_list = explode("\n", $options['white_list']);
         $options['white_list_array'] = array_map(function ($val) {
             return trim($val);
         }, $white_list);
     }
     return $options;
 }
Esempio n. 8
0
 public function __construct($request)
 {
     parent::__construct($request);
     $this->images_controller = cmsCore::getController('images');
 }