+/**
+ * SquirrelMail internal version number -- DO NOT CHANGE
+ * $sm_internal_version = array (release, major, minor)
+ */
+$SQM_INTERNAL_VERSION = preg_split('/\./', SM_VERSION, 3);
+$SQM_INTERNAL_VERSION[2] = intval($SQM_INTERNAL_VERSION[2]);
+
+
+/* if plugins are disabled only for one user and
+ * the current user is NOT that user, turn them
+ * back on
+ */
+sqgetGlobalVar('username',$username,SQ_SESSION);
+if ($disable_plugins && !empty($disable_plugins_user)
+ && $username != $disable_plugins_user) {
+ $disable_plugins = false;
+}
+
+/* remove all plugins if they are disabled */
+if ($disable_plugins) {
+ $plugins = array();
+}
+
+
+/**
+ * Include Compatibility plugin if available.
+ */
+if (!$disable_plugins && file_exists(SM_PATH . 'plugins/compatibility/functions.php'))
+ include_once(SM_PATH . 'plugins/compatibility/functions.php');
+
+/**
+ * MAIN PLUGIN LOADING CODE HERE
+ * On init, we no longer need to load all plugin setup files.
+ * Now, we load the statically generated hook registrations here
+ * and let the hook calls include only the plugins needed.
+ */
+$squirrelmail_plugin_hooks = array();
+if (!$disable_plugins && file_exists(SM_PATH . 'config/plugin_hooks.php')) {
+ require(SM_PATH . 'config/plugin_hooks.php');
+}
+
+/**
+ * allow plugins to override main configuration; hook is placed
+ * here to allow plugins to use session information to do their work
+ */
+do_hook('config_override', $null);
+