]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-extensions.php
Global variables rewritten
[mailer.git] / inc / modules / admin / what-extensions.php
index 54c37e4dd3205436d3a00a0c2a94fb75bb0f56e1..548d708ade487c736f8f455754c57c095270db3f 100644 (file)
@@ -40,8 +40,6 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 // Add description as navigation point
 ADD_DESCR("admin", __FILE__);
 
-global $cacheInstance, $cacheArray, $cacheMode;
-
 // Normally we want the overview of all registered extensions
 $do = "overview";
 $SEL = 0;
@@ -55,7 +53,7 @@ if (!empty($_GET['reg_ext'])) {
        // De-/activate extensions
        foreach ($_POST['sel'] as $ext_id => $active) {
                // Shall we keep the extension always active?
-               if ((isset($cacheArray['active_extensions'][GET_EXT_NAME($ext_id)])) && ($cacheArray['active_extensions'][GET_EXT_NAME($ext_id)] == "Y") && ($active == "N")) {
+               if ((isset($GLOBALS['cache_array']['active_extensions'][GET_EXT_NAME($ext_id)])) && ($GLOBALS['cache_array']['active_extensions'][GET_EXT_NAME($ext_id)] == "Y") && ($active == "N")) {
                        // Keep this extension active!
                } else {
                        // De/activate extension
@@ -125,8 +123,8 @@ if (!empty($_GET['reg_ext'])) {
                                }
 
                                // Output row
-                               $CSS = "---";
-                               if (GET_EXT_VERSION("sql_patches") >= "0.0.6") $CSS = ADD_SELECTION("yn", $css, "css", $ext_id);
+                               $cssSelection = "---";
+                               if (GET_EXT_VERSION("sql_patches") >= "0.0.6") $cssSelection = ADD_SELECTION("yn", $css, "css", $ext_id);
 
                                // Prepare data for the row template
                                $content = array(
@@ -134,7 +132,7 @@ if (!empty($_GET['reg_ext'])) {
                                        'id'     => $ext_id,
                                        'name'   => $name,
                                        'active' => ADD_SELECTION("yn", $active, "active", $ext_id),
-                                       'css'    => $CSS,
+                                       'css'    => $cssSelection,
                                );
 
                                // Load row template and switch color
@@ -239,8 +237,9 @@ ORDER BY ext_name", __FILE__, __LINE__);
                // Extensions are registered
                $SW = 2; $OUT = "";
                while ($content = SQL_FETCHARRAY($result)) {
-                       $CSS = "---";
-                       if (GET_EXT_VERSION("sql_patches") >= "0.0.6") $CSS = TRANSLATE_YESNO($content['ext_css']);
+                       // Prepare CSS selection output
+                       $cssSelection = "---";
+                       if (GET_EXT_VERSION("sql_patches") >= "0.0.6") $cssSelection = TRANSLATE_YESNO($content['ext_css']);
 
                        // Prepare data for the row template
                        $content = array(
@@ -249,7 +248,7 @@ ORDER BY ext_name", __FILE__, __LINE__);
                                'name'    => $content['ext_name'],
                                'active'  => TRANSLATE_YESNO($content['ext_active']),
                                'act_val' => $content['ext_active'],
-                               'css'     => $CSS,
+                               'css'     => $cssSelection,
                                'ver'     => $content['ext_version'],
                        );
 
@@ -320,11 +319,11 @@ case "register": // Register new extension
                                        }
 
                                        // Do we need to update cache file?
-                                       if ((EXT_IS_ACTIVE("cache")) && ($cacheMode != "no")) {
+                                       if ((EXT_IS_ACTIVE("cache")) && ($GLOBALS['cacheMode'] != "no")) {
                                                // Remove cache file (will be auto-created again!)
-                                               if ($cacheInstance->loadCacheFile("config")) $cacheInstance->destroyCacheFile();
-                                               if ($cacheInstance->loadCacheFile("extensions", true)) $cacheInstance->destroyCacheFile();
-                                               if ($cacheInstance->loadCacheFile("mod_reg")) $cacheInstance->destroyCacheFile();
+                                               if ($GLOBALS['cache_instance']->loadCacheFile("config")) $GLOBALS['cache_instance']->destroyCacheFile();
+                                               if ($GLOBALS['cache_instance']->loadCacheFile("extensions", true)) $GLOBALS['cache_instance']->destroyCacheFile();
+                                               if ($GLOBALS['cache_instance']->loadCacheFile("mod_reg")) $GLOBALS['cache_instance']->destroyCacheFile();
                                        } // END - if
                                } elseif (GET_EXT_VERSION($ext_name) != "") {
                                        // Notify the admin that we have a problem here...