Final fixes for password reset behavior on sql_patches removal :)
[mailer.git] / inc / modules / admin / what-extensions.php
index eb6079c..b6a7d36 100644 (file)
@@ -206,10 +206,6 @@ if (!empty($_GET['reg_ext'])) {
                if ($active == 1) {
                        // Run embeded SQL commands
                        EXTENSION_RUN_SQLS($id, "remove");
-
-                       // Delete this extension (remember to remove it from your server *before* you click on welcome!
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE id=%d LIMIT 1",
-                        array($id), __FILE__, __LINE__);
                } // END - if
        } // END - foreach
 } elseif (!empty($_GET['do']) && (!IS_DEMO())) {
@@ -309,19 +305,15 @@ case "register": // Register new extension
                        // ... so we can finally register and load it in registration mode
                        $status = EXTENSION_REGISTER($ext_name, $id);
                        if ($status == true) {
-                               // Is this sql_patches? Then we need to auto-logout!
-                               if ($ext_name == "sql_patches") {
-                                       // Auto-logout here
-                                       LOAD_URL("modules.php?module=admin&logout=1&install=sql_patches");
-                               }
-
                                // Extension was found and successfully registered
                                LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_EXTENSION_REGISTERED);
 
                                // Do we need to update cache file?
                                if ((EXT_IS_ACTIVE("cache")) && ($cacheMode != "no")) {
                                        // Remove cache file (will be auto-created again!)
+                                       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();
                                }
                        } else {
                                // Motify the admin that we have a problem here...