From: tokul Date: Wed, 12 Apr 2006 05:56:42 +0000 (+0000) Subject: load hashing functions in all setups X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4d2f75659ed613dbd0e614a537595dc032f24c1f;p=squirrelmail.git load hashing functions in all setups git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11052 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/include/init.php b/include/init.php index 85b7b94d..7ed4687c 100644 --- a/include/init.php +++ b/include/init.php @@ -221,13 +221,18 @@ if (isset($plugins) && is_array($plugins)) { switch ($sInitLocation) { case 'style': session_write_close(); sqsetcookieflush(); break; case 'redirect': + /** + * directory hashing functions are needed for all setups in case + * plugins use own pref files. + */ + require(SM_PATH . 'functions/prefs.php'); + /* hook loads custom prefs backend plugins */ $prefs_backend = do_hook_function('prefs_backend'); if (isset($prefs_backend) && !empty($prefs_backend) && file_exists(SM_PATH . $prefs_backend)) { require(SM_PATH . $prefs_backend); } elseif (isset($prefs_dsn) && !empty($prefs_dsn)) { require(SM_PATH . 'functions/db_prefs.php'); } else { - require(SM_PATH . 'functions/prefs.php'); require(SM_PATH . 'functions/file_prefs.php'); } //nobreak; @@ -301,13 +306,15 @@ switch ($sInitLocation) { $prefs_cache = false; //array(); } + /* see 'redirect' switch */ + require(SM_PATH . 'functions/prefs.php'); + $prefs_backend = do_hook_function('prefs_backend'); if (isset($prefs_backend) && !empty($prefs_backend) && file_exists(SM_PATH . $prefs_backend)) { require(SM_PATH . $prefs_backend); } elseif (isset($prefs_dsn) && !empty($prefs_dsn)) { require(SM_PATH . 'functions/db_prefs.php'); } else { - require(SM_PATH . 'functions/prefs.php'); require(SM_PATH . 'functions/file_prefs.php'); }