Esempio n. 1
0
 /**
  * Check if all required settings have been set
  *
  * @param string $module The module.
  */
 public function __construct($module)
 {
     parent::__construct($module);
     $this->loadEngineFiles();
     $url = Spoon::exists('url') ? Spoon::get('url') : null;
     // do the client ID check if we're not in the settings page
     if ($url != null && !in_array($url->getAction(), array('settings', 'import_groups', 'link_account', 'load_client_info'))) {
         $this->checkForAccount();
         $this->checkForClientID();
         $this->checkForGroups();
     }
 }
Esempio n. 2
0
 /**
  * Check if all required settings have been set
  *
  * @return	void
  * @param	string $module	The module.
  */
 public function __construct($module)
 {
     // parent construct
     parent::__construct($module);
     // load additional engine files
     $this->loadEngineFiles();
     // get url object reference
     $url = Spoon::exists('url') ? Spoon::get('url') : null;
     // do the client ID check if we're not in the settings page
     if ($url != null && $url->getAction() != 'settings' && $url->getAction() != 'import_groups' && strpos($url->getQueryString(), 'link_account') === false && strpos($url->getQueryString(), 'load_client_info') === false) {
         // check for CM account
         $this->checkForAccount();
         // check for client ID
         $this->checkForClientID();
         // check for groups
         $this->checkForGroups();
     }
 }
Esempio n. 3
0
 /**
  * Check if all required settings have been set
  *
  * @param string $module The module.
  */
 public function __construct($module)
 {
     parent::__construct($module);
     $error = false;
     $action = Spoon::exists('url') ? Spoon::get('url')->getAction() : null;
     // analytics session token
     if (BackendModel::getModuleSetting('analytics', 'session_token') === null) {
         $error = true;
     }
     // analytics table id
     if (BackendModel::getModuleSetting('analytics', 'table_id') === null) {
         $error = true;
     }
     // missing settings, so redirect to the index-page to show a message (except on the index- and settings-page)
     if ($error && $action != 'settings' && $action != 'index') {
         SpoonHTTP::redirect(BackendModel::createURLForAction('index'));
     }
 }