コード例 #1
0
ファイル: Email.php プロジェクト: vigm/advancedMD
 public function __construct()
 {
     parent::__construct();
     if (!ee()->cp->allowed_group('can_access_comm')) {
         show_error(lang('unauthorized_access'));
     }
 }
コード例 #2
0
ファイル: Messages.php プロジェクト: vigm/advancedMD
 public function __construct()
 {
     parent::__construct();
     if (!ee()->cp->allowed_group('can_access_members', 'can_admin_design')) {
         show_error(lang('unauthorized_access'));
     }
 }
コード例 #3
0
ファイル: Buttons.php プロジェクト: vigm/advancedMD
 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);
 }
コード例 #4
0
ファイル: General.php プロジェクト: vigm/advancedMD
 /**
  * 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);
 }