]> git.mxchange.org Git - mailer.git/blobdiff - inc/load_extensions.php
Variable rewritten to ['ref_level'] to avoid trouble with referal system
[mailer.git] / inc / load_extensions.php
index 166aab7a833bb21a3ff1f05edb52a02c888c4832..7ec8ecc44f4a81046218db101cfbb23b069a4e75 100644 (file)
@@ -68,11 +68,11 @@ if (EXT_IS_ACTIVE("cache")) {
        }
 
        // Do we need to init the cache?
-       if (($cacheMode == "init") && ($_CONFIG['cache_exts'] == "Y")) {
+       if (($cacheMode == "init") && (getConfig('cache_exts') == "Y")) {
                // Init cache file
                $cacheInstance->init("EXTENSIONS");
                $cacheInstance->storeExtensionVersion("sql_patches");
-       } elseif ($_CONFIG['cache_exts'] == "N") {
+       } elseif (getConfig('cache_exts') == "N") {
                // Cache will not be created for extensions
                $cacheMode = "skip";
        }
@@ -94,7 +94,8 @@ if ($cacheMode == "load") {
                // Cache file is damaged so kill it
                $cacheInstance->destroyCacheFile();
 
-               // Skip any further execution
+               // Retry it
+               require(__FILE__);
                return;
        } // END -  if
 
@@ -187,8 +188,8 @@ $DEL = array();
 
 // At least one found?
 if ((SQL_NUMROWS($res_ext_crt) > 0) && ((($cacheMode == "init") && ($CSS != "1") && ($CSS != "-1")) || ($cacheMode == "no"))) {
-       // Load theme management
-       require_once(PATH."inc/theme-manager.php");
+       // Load session management
+       require_once(PATH."inc/session.php");
 
        // Extensions are registered so we load them
        while ($content = SQL_FETCHARRAY($res_ext_crt)) {
@@ -261,15 +262,8 @@ if ((SQL_NUMROWS($res_ext_crt) > 0) && ((($cacheMode == "init") && ($CSS != "1")
        SQL_FREERESULT($res_ext_crt);
 } // END - if
 
-// Load include files if found
-if (!empty($INC_POOL[0])) {
-       foreach ($INC_POOL as $inc) {
-               require_once($inc);
-       } // END - foreach
-
-       // Remove array
-       unset($INC_POOL);
-} // END - if
+// Run the filter
+RUN_FILTER('load_includes');
 
 // Uninstall extensions that are no longer in our system
 if (!empty($DEL[0])) {
@@ -280,7 +274,7 @@ if (!empty($DEL[0])) {
                        array($del_ext), __FILE__, __LINE__);
 
                // Remove (maybe?) found tasks (main task and possible updates
-               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE subject LIKE '[%s:]%%' AND (task_type='EXTENSION' OR task_type='EXTENSION_UPDATE')",
+               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE subject='[%s:]' AND (task_type='EXTENSION' OR task_type='EXTENSION_UPDATE')",
                        array($del_ext), __FILE__, __LINE__);
        } // END - foreach