Security line in all includes changed
[mailer.git] / inc / modules / admin / what-extensions.php
index ce0379f..a8181f2 100644 (file)
@@ -32,7 +32,7 @@
  ************************************************************************/
 
 // Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
@@ -72,7 +72,7 @@ if (!empty($_GET['reg_ext'])) {
        // Change settings like CSS file load
        if (isset($_POST['modify'])) {
                // Change entries
-               $cacheInstance_UPDATE = 0;
+               $cache_update = 0;
                foreach ($_POST['sel'] as $id => $sel) {
                        // Secure ID
                        $id = bigintval($id);
@@ -197,7 +197,7 @@ if (!empty($_GET['reg_ext'])) {
        $do = "delete";
 } elseif ((isset($_POST['remove'])) && ($SEL > 0) && (!IS_DEMO())) {
        // Remove extensions from DB (you have to delete all files manually!)
-       $cacheInstance_UPDATE = 0;
+       $cache_update = 0;
        foreach ($_POST['sel'] as $id => $active) {
                // Secure ID number
                $id = bigintval($id);
@@ -297,7 +297,7 @@ case "register": // Register new extension
                SQL_FREERESULT($result);
 
                // Disable cache update by default
-               $cacheInstance_UPDATE = 0;
+               $cache_update = 0;
                if (!empty($subj)) {
                        // Extract extension's name from subject...
                        $ext_name = trim(substr($subj, 1, strpos($subj, ":") - 1));
@@ -314,7 +314,7 @@ case "register": // Register new extension
                                        if ($cacheInstance->cache_file("config"    , true)) $cacheInstance->cache_destroy();
                                        if ($cacheInstance->cache_file("extensions", true)) $cacheInstance->cache_destroy();
                                        if ($cacheInstance->cache_file("mod_reg"   , true)) $cacheInstance->cache_destroy();
-                               }
+                               } // END - if
                        } elseif (GET_EXT_VERSION($ext_name) != "") {
                                // Motify the admin that we have a problem here...
                                LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_REG_FAILED_ALREADY);