From: pdontthink Date: Fri, 24 Aug 2007 04:35:27 +0000 (+0000) Subject: Move prefs init above plugin stuff, make life easier for plugins hooked on config_ove... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6d5775dbc08a4dc4f5b2c0751804f3934774c690;p=squirrelmail.git Move prefs init above plugin stuff, make life easier for plugins hooked on config_override git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12594 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/include/init.php b/include/init.php index 39e54371..a85068dc 100644 --- a/include/init.php +++ b/include/init.php @@ -229,6 +229,19 @@ $SQM_INTERNAL_VERSION = explode('.', SM_VERSION, 3); $SQM_INTERNAL_VERSION[2] = intval($SQM_INTERNAL_VERSION[2]); +/* load prefs system; even when user not logged in, should be OK to do this here */ +require(SM_PATH . 'functions/prefs.php'); + +$prefs_backend = do_hook('prefs_backend', $null); +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/file_prefs.php'); +} + + /* if plugins are disabled only for one user and * the current user is NOT that user, turn them * back on @@ -293,19 +306,6 @@ if (! sqgetGlobalVar('squirrelmail_language',$squirrelmail_language,SQ_COOKIE)) } -/* load prefs system; even when user not logged in, should be OK to do this here */ -require(SM_PATH . 'functions/prefs.php'); - -$prefs_backend = do_hook('prefs_backend', $null); -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/file_prefs.php'); -} - - /** * Do something special for some pages. This is based on the PAGE_NAME constand * set at the top of every page.