Beispiel #1
0
 /**
  * Initialize by ConfigOptions
  * @return GWF3 
  */
 public function init()
 {
     $config =& self::$CONFIG;
     if (true === $config['start_debug']) {
         GWF_Debug::enableErrorHandler();
         GWF_Debug::setMailOnError((GWF_DEBUG_EMAIL & 2) > 0);
     }
     if (true === $config['kick_banned_ip']) {
         $this->onKickBannedIP();
     }
     if (true === defined('GWF_WEBSITE_DOWN')) {
         $this->setConfig('load_module', false);
         $this->setConfig('autoload_modules', false);
         $this->setConfig('no_session', true);
     }
     // 		$db = gdo_db();
     if (false === $config['no_session']) {
         $this->onStartSession($config['blocking']);
     }
     if (true === $config['website_init']) {
         $db = gdo_db();
         GWF_Website::init();
     }
     if (true === $config['do_logging']) {
         $this->onStartLogging($config['no_session']);
     }
     if (true === $config['autoload_modules']) {
         $this->onAutoloadModules();
     }
     if (true === $config['get_user']) {
         GWF_Template::addMainTvars(array('user' => self::$user = GWF_User::getStaticOrGuest()));
     }
     if (true === $config['load_module']) {
         $this->onLoadModule();
     }
     if (true === defined('GWF_WEBSITE_DOWN')) {
         die($this->onDisplayPage(GWF_WEBSITE_DOWN));
     }
     return $this;
 }