if (!isExtensionDeprecated()) {
// ... so we can finally register and load it in registration mode
if (registerExtension($ext_name, $taskId)) {
- // Errors?
- if (!ifFatalErrorsDetected()) {
- // Extension was found and successfully registered
- redirectToUrl('modules.php?module=admin&what=extensions&registered=' . getExtensionId($ext_name));
- } else {
- // Errors detected!
- displayMessage('{%message,ADMIN_EXTENSION_NOT_REGISTERED=' . $ext_name . '%}');
- }
-
// Do we need to update cache file?
// @TODO Rewrite this to a filter
if (isExtensionActive('cache')) {
if ($GLOBALS['cache_instance']->loadCacheFile('filter')) $GLOBALS['cache_instance']->removeCacheFile();
if ($GLOBALS['cache_instance']->loadCacheFile('modules')) $GLOBALS['cache_instance']->removeCacheFile();
} // END - if
+
+ // Errors?
+ if (!ifFatalErrorsDetected()) {
+ // Extension was found and successfully registered
+ redirectToUrl('modules.php?module=admin&what=extensions&registered=' . getExtensionId($ext_name));
+ } else {
+ // Errors detected!
+ displayMessage('{%message,ADMIN_EXTENSION_NOT_REGISTERED=' . $ext_name . '%}');
+ }
} elseif (isExtensionInstalled($ext_name)) {
// Notify the admin that we have a problem here...
displayMessage('{--ADMIN_EXTENSION_REGISTRATION_FAILED_ALREADY--}');