Exemple #1
0
 public function __construct()
 {
     parent::__construct();
     if (!ee()->cp->allowed_group('can_access_comm')) {
         show_error(lang('unauthorized_access'));
     }
 }
Exemple #2
0
 public function __construct()
 {
     parent::__construct();
     if (!ee()->cp->allowed_group('can_access_members', 'can_admin_design')) {
         show_error(lang('unauthorized_access'));
     }
 }
Exemple #3
0
 public function __construct()
 {
     parent::__construct();
     ee()->lang->load('admin_content');
     // load the predefined buttons
     include_once APPPATH . 'config/html_buttons.php';
     $this->predefined = $predefined_buttons;
     $this->index_url = $this->base_url;
     $this->base_url = ee('CP/URL')->make($this->base_url);
 }
Exemple #4
0
 /**
  * Save the settings from General, but make sure to save site name and label
  * manually
  *
  * @param	array	$sections	Array of sections passed to form view
  * @return	bool	Success or failure of saving the settings
  */
 protected function saveSettings($sections)
 {
     // Remove site_name/label
     $site = ee('Model')->get('Site')->filter('site_id', ee()->config->item('site_id'))->first();
     // Site_name is the version of the name that's used in parameters and
     // must be all one word, no spaces. site_label is the version that's
     // more outward facing.
     $site->site_name = ee()->input->post('site_short_name');
     $site->site_label = ee()->input->post('site_name');
     $site->save();
     unset($sections[0][0]);
     unset($sections[0][1]);
     return parent::saveSettings($sections);
 }