]> git.mxchange.org Git - mailer.git/blobdiff - inc/load_extensions.php
sql_patches/cache must now load
[mailer.git] / inc / load_extensions.php
index 97241d85a771afb4ef0521a6a4d1885dfd34ff7d..726591df3daee00f7e50895b2007fd29a86fd892 100644 (file)
@@ -46,7 +46,13 @@ $GLOBALS['cache_instance'] = null;
 $GLOBALS['cache_array'] = array();
 
 // Skip loading extensions
-if ((!isBooleanConstantAndTrue('mxchange_installed')) || (isBooleanConstantAndTrue('mxchange_installing'))) return;
+if ((!isBooleanConstantAndTrue('mxchange_installed')) || (isInstalling())) {
+       // Init filter system here
+       INIT_FILTER_SYSTEM();
+
+       // Skip loading
+       return;
+} // END - if
 
 // Initialize array for "always keep active extensions"
 $GLOBALS['cache_array']['active_extensions'] = array();
@@ -55,14 +61,23 @@ $GLOBALS['cache_array']['active_extensions'] = array();
 $GLOBALS['cacheMode'] = "no";
 
 // Load sql_patchrs extension alone
-LOAD_EXTENSION("sql_patches");
+if (!LOAD_EXTENSION("sql_patches")) {
+       // Could not load sql_patches! ARGH!!!
+       trigger_error("Cannot load extension sql_patches.");
+} // END - if
+
+// Init inc pool array
+$INC_POOL = array();
 
 //
 // Load extensions
 //
 if (EXT_IS_ACTIVE("cache")) {
        // Load cache extension alone
-       LOAD_EXTENSION("cache");
+       if (!LOAD_EXTENSION("cache")) {
+               // Extension 'cache' was not loaded
+               trigger_error("Cannot load extension cache.");
+       } // END - if
 
        // Check extension cache
        switch (($GLOBALS['cache_instance']->loadCacheFile("extensions", true)) && ($GLOBALS['cache_instance']->extensionVersionMatches("sql_patches"))) {
@@ -194,9 +209,6 @@ $DEL = array();
 
 // At least one found?
 if ((SQL_NUMROWS($res_ext_crt) > 0) && ((($GLOBALS['cacheMode'] == "init") && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) || ($GLOBALS['cacheMode'] == "no"))) {
-       // Load session management
-       LOAD_INC_ONCE("inc/session.php");
-
        // Extensions are registered so we load them
        while ($content = SQL_FETCHARRAY($res_ext_crt)) {
                // Get menu entry