Esempio n. 1
0
 /**
  * Initializes the entire admin app
  * @access public
  */
 public function __construct($config)
 {
     // call the bootstrap function to initialize everything
     parent::__construct($config);
     // if new display settings are set in the url, save them to the database
     if ($this->params->get->getElemId('sort_location') && $this->params->get->getElemId('sort_by')) {
         $this->prefs->addSort($this->params->get->getElemId('sort_location'), $this->params->get->getElemId('sort_by'), $this->params->get->getElemId('sort_direction'));
     }
     if ($this->config('enable_authentication_support')) {
         // load all default user preferences
         if ($this->params->session->getInt('user_id')) {
             $this->prefs->loadUserPreferences();
         }
         // determine if the current user is an admin
         define('IS_ADMIN', $this->user->userHasGlobalAccess());
         // determine if this a one-user system or not
         define('MULTIPLE_USERS', $this->user->userAccountCount() == 1 ? false : true);
     } else {
         define('IS_ADMIN', false);
         define('MULTIPLE_USERS', false);
     }
     // set the referring page unless we're POSTing
     $post_set = $this->params->getRawSource('post');
     if (!$post_set) {
         $this->router->setReturnToReferrer();
     }
     // load a module based off of parameters in the URL
     $this->router->loadFromUrl();
     // end logging
     $end = Date::microtime();
     $this->log->write('Application request completed at ' . Date::formatMicrotime($end));
     $this->log->write('Time Spent: ' . ($end - Date::microtime(EXECUTION_START)) . ' seconds');
 }
Esempio n. 2
0
 public function __construct($config)
 {
     parent::__construct($config);
     define('PATH_HOME', PATH_TRUNK . 'workflow' . PATH_SEP);
     define('PATH_OUTTRUNK', realpath(PATH_TRUNK . '../') . PATH_SEP);
     require_once PATH_HOME . 'engine/config/paths.php';
     //if (php_sapi_name() !== 'cli') {
     session_start();
     // starting session
     //}
 }
 /**
  * Constructor
  * Attention: MUST NOT BE CALLED DIRECTLY! USE get_instance() INSTEAD!
  *
  * @author peshkov@UD
  */
 protected function __construct($args)
 {
     parent::__construct($args);
     //** Load text domain */
     add_action('after_setup_theme', array($this, 'load_textdomain'), 1);
     //** TGM Plugin activation. */
     $this->check_plugins_requirements();
     //** May be initialize Licenses Manager. */
     $this->define_license_manager();
     //** Maybe define license client */
     $this->define_license_client();
     add_action('after_setup_theme', array($this, 'pre_init'), 100);
     $this->boot();
 }
 /**
  * Constructor
  * Attention: MUST NOT BE CALLED DIRECTLY! USE get_instance() INSTEAD!
  *
  * @author peshkov@UD
  */
 protected function __construct($args)
 {
     parent::__construct($args);
     //** Maybe define license client */
     $this->define_license_client();
     //** Load text domain */
     add_action('plugins_loaded', array($this, 'load_textdomain'), 1);
     //** May be initialize Licenses Manager. */
     add_action('plugins_loaded', array($this, 'define_license_manager'), 1);
     //** Initialize plugin here. All plugin actions must be added on this step */
     add_action('plugins_loaded', array($this, 'pre_init'), 100);
     //** TGM Plugin activation. */
     add_action('plugins_loaded', array($this, 'check_plugins_requirements'), 10);
     $this->boot();
 }
Esempio n. 5
0
 /**
  * @abstract Constructor, initializes the module
  * @return Cms
  * @access public
  */
 public function __construct($config)
 {
     parent::__construct($config);
     // ensure the cms has been installed
     if (!$this->isInstalled()) {
         print 'This application must be installed before you may use it. Please follow the documentation for installation.';
         exit;
     }
     // determine if the current user is an admin
     define('IS_ADMIN', $this->user->userHasGlobalAccess());
     // load pages module, and any module hooks
     //		$this->loadModule('c3f28790-269f-11dd-bd0b-0800200c9a66');
     // run all init commands from library
     $this->cms_lib->load();
     // load the template, display the page
     $this->displayPage();
 }
 public function __construct($plugin_version, $plugins_url)
 {
     parent::__construct($plugin_version, $plugins_url);
 }
Esempio n. 7
0
 public function __construct()
 {
     parent::__construct();
 }