- // ... so we can finally register and load it in registration mode
- $status = EXTENSION_REGISTER($ext_name, $id);
- if ($status == true) {
- // 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->loadCacheFile("config")) $cacheInstance->destroyCacheFile();
- if ($cacheInstance->loadCacheFile("extensions", true)) $cacheInstance->destroyCacheFile();
- if ($cacheInstance->loadCacheFile("mod_reg")) $cacheInstance->destroyCacheFile();
- } // 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);
+ // Test the extension for deprecation
+ global $EXT_DEPRECATED;
+ LOAD_EXTENSION($ext_name, "test");
+
+ // Is the extension deprecated?
+ if ($EXT_DEPRECATED == "N") {
+ // ... so we can finally register and load it in registration mode
+ $status = EXTENSION_REGISTER($ext_name, $ext_id);
+ if ($status == true) {
+ // Extension was found and successfully registered
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_EXTENSION_REGISTERED'));
+
+ // Show next link
+ if (EXT_IS_ACTIVE("task")) {
+ LOAD_TEMPLATE("admin_next_link", false, array(
+ 'url' => "modules.php?module=admin&what=list_task",
+ 'title' => getMessage('ADMIN_EXT_REGISTER_NEXT_LINK')
+ ));
+ } else {
+ LOAD_TEMPLATE("admin_next_link", false, array(
+ 'url' => "modules.php?module=admin",
+ 'title' => getMessage('ADMIN_EXT_REGISTER_NEXT_LINK')
+ ));
+ }
+
+ // Do we need to update cache file?
+ if ((EXT_IS_ACTIVE("cache")) && ($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();
+ } // END - if
+ } elseif (GET_EXT_VERSION($ext_name) != "") {
+ // Notify the admin that we have a problem here...
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_REG_FAILED_ALREADY'));
+ } else {
+ // Notify the admin that we have a problem here...
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_REG_FAILED_404'));
+ }