-if ((!isBooleanConstantAndTrue('mxchange_installed')) || (isBooleanConstantAndTrue('mxchange_installing'))) return;
-
-// Load default sql_patches extension if present
-if (file_exists(PATH."inc/extensions/ext-sql_patches.php") && is_readable(PATH."inc/extensions/ext-sql_patches.php")) {
- // Load it...
- $EXT_LOAD_MODE = "";
- require_once(PATH."inc/extensions/ext-sql_patches.php");
- $cacheArray['active_extensions'] = array('sql_patches' => 'Y'); // KEEP THIS ALWAYS ACTIVE!
-} else {
- // Initialize array for "always keep active extensions"
- $cacheArray['active_extensions'] = array();
-}
+if ((!isInstalled()) || (isInstalling())) {
+ // Init filter system here
+ initFilterSystem();
+
+ // Skip loading
+ return;
+} // END - if
+
+// Initialize array for "always keep active extensions"
+$GLOBALS['cache_array']['active_extensions'] = array();
+
+// By default no cache is set
+$GLOBALS['cache_mode'] = 'no';
+
+// Load sql_patchrs extension alone
+if (!LOAD_EXTENSION('sql_patches')) {
+ // Could not load sql_patches! ARGH!!!
+ trigger_error('Cannot load extension sql_patches.');
+} // END - if
+
+// Init inc pool array
+INIT_INC_POOL();