From 4d2f75659ed613dbd0e614a537595dc032f24c1f Mon Sep 17 00:00:00 2001 From: tokul Date: Wed, 12 Apr 2006 05:56:42 +0000 Subject: [PATCH] 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 --- include/init.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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'); } -- 2.25.1