Skip to content

Commit

Permalink
Fixed: Include path set too late
Browse files Browse the repository at this point in the history
  • Loading branch information
nuxwin committed Aug 7, 2013
1 parent cdb48e2 commit b5ce74b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 21 deletions.
21 changes: 0 additions & 21 deletions gui/library/iMSCP/Initializer.php
Expand Up @@ -134,7 +134,6 @@ protected function _processAll()
$this->_initializeLayout();
$this->_setExceptionWriters();
$this->_initializeSession();
$this->_setIncludePath();
$this->_initializeDatabase();
$this->_setTimezone();
$this->_processConfiguration();
Expand Down Expand Up @@ -265,24 +264,6 @@ protected function _initializeSession()
Zend_Session::start();
}

/**
* Sets include path.
*
* Sets the PHP include_path. Duplicates entries are removed.
*
* @return void
*/
protected function _setIncludePath()
{
// Ensure library/ and vendor/ are in include_path
set_include_path(
implode(
PATH_SEPARATOR,
array_unique(array(LIBRARY_PATH, LIBRARY_PATH . '/vendor', DEFAULT_INCLUDE_PATH))
)
);
}

/**
* Load user's GUI properties in session.
*
Expand Down Expand Up @@ -463,8 +444,6 @@ protected function _initializeOutputBuffering()
*/
protected function _initializeLocalization()
{


$locale = isset($_SESSION['user_def_lang']) ? $_SESSION['user_def_lang'] : $this->_config->USER_INITIAL_LANG;

$checkedLocale = setlocale(
Expand Down
8 changes: 8 additions & 0 deletions gui/library/imscp-lib.php
Expand Up @@ -69,6 +69,14 @@
// Define persistent directory path
define('PERSISTENT_PATH', GUI_ROOT_DIR .'/data/persistent');

// Set include path
set_include_path(
implode(
PATH_SEPARATOR,
array_unique(array(LIBRARY_PATH, LIBRARY_PATH . '/vendor', DEFAULT_INCLUDE_PATH))
)
);

// Autoloader
// TODO generate a classmap on first load and cache it for better performances
require_once 'iMSCP/Loader/AutoloaderFactory.php';
Expand Down

0 comments on commit b5ce74b

Please sign in to comment.