Пример #1
0
 public static final function init($reset = false)
 {
     $GLOBALS['ApplicationUrl'] = SENDSTUDIO_APPLICATION_URL;
     if (defined('SENDSTUDIO_IS_SETUP') && SENDSTUDIO_IS_SETUP && !InterspireEvent::eventExists('IEM_MARKER_20090701')) {
         IEM_Installer::RegisterEventListeners();
         require_once IEM_ADDONS_PATH . '/interspire_addons.php';
         $addons = new Interspire_Addons();
         $addons->FixEnabledEventListeners();
         InterspireEvent::eventCreate('IEM_MARKER_20090701');
     }
     if (!self::configInit($reset)) {
         return false;
     }
     if (!self::sessionInit($reset)) {
         return false;
     }
     if (!self::userInit($reset)) {
         return false;
     }
     $tempUser = IEM::getCurrentUser();
     $tempUserLanguage = 'default';
     if (!empty($tempUser->user_language) && is_dir(IEM_PATH . "/language/{$tempUser->user_language}")) {
         $tempUserLanguage = $tempUser->user_language;
     }
     require_once IEM_PATH . "/language/{$tempUserLanguage}/whitelabel.php";
     require_once IEM_PATH . "/language/{$tempUserLanguage}/language.php";
     self::$_enableInfoTips = false;
     if (isset($tempUser->infotips) && $tempUser->infotips) {
         self::$_enableInfoTips = true;
     }
     unset($tempUserLanguage);
     unset($tempUser);
 }
Пример #2
0
	/**
	 * RunUpgrade
	 * Runs the reregister_listeners
	 *
	 * @return Boolean Returns TRUE if successful, FALSE otherwise
	 */
	function RunUpgrade()
	{
		try {
			// Restore default listeners
			IEM_Installer::RegisterEventListeners();

			// Restore Addons listeners
			require_once IEM_ADDONS_PATH . '/interspire_addons.php';
			$addons = new Interspire_Addons();
			$addons->FixEnabledEventListeners();
		} catch (Exception $e) {
			return true;
		}

		return true;
	}
Пример #3
0
 /**
  * Initialize the framework
  * @param Boolean $reset Whether or not to re-initialize the framework again
  * @return Boolean Returns TRUE the application initializes without encountering any errors, FALSE otherwise
  */
 public static final function init($reset = false)
 {
     $GLOBALS['ApplicationUrl'] = SENDSTUDIO_APPLICATION_URL;
     // Defining IEM_MARKER in the event is part of the installation procedure
     // If it is not there, we can assume that the stash file has been overwritten
     // So we will need to restore it.
     // TODO change reference to SENSTUDIO_IS_SETUP
     if (defined('SENDSTUDIO_IS_SETUP') && SENDSTUDIO_IS_SETUP && !InterspireEvent::eventExists('IEM_MARKER_20090701')) {
         IEM_Installer::RegisterEventListeners();
         // Restore Addons listeners
         require_once IEM_ADDONS_PATH . '/interspire_addons.php';
         $addons = new Interspire_Addons();
         $addons->FixEnabledEventListeners();
         InterspireEvent::eventCreate('IEM_MARKER_20090701');
     }
     if (!self::configInit($reset)) {
         return false;
     }
     if (!self::sessionInit($reset)) {
         return false;
     }
     if (!self::userInit($reset)) {
         return false;
     }
     // ----- Include common language variables
     $tempUser = IEM::getCurrentUser();
     $tempUserLanguage = 'default';
     if (!empty($tempUser->user_language) && is_dir(IEM_PATH . "/language/{$tempUser->user_language}")) {
         $tempUserLanguage = $tempUser->user_language;
     }
     require_once IEM_PATH . "/language/{$tempUserLanguage}/whitelabel.php";
     require_once IEM_PATH . "/language/{$tempUserLanguage}/language.php";
     self::$_enableInfoTips = false;
     if (isset($tempUser->infotips) && $tempUser->infotips) {
         self::$_enableInfoTips = true;
     }
     unset($tempUserLanguage);
     unset($tempUser);
     // -----
 }