From: Roland Häder Date: Sun, 4 Dec 2011 00:37:41 +0000 (+0000) Subject: First purge cache files, then redirect ... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=546449e88f44bffb20ae7d30ff92aad8928190bd;p=mailer.git First purge cache files, then redirect ... --- diff --git a/inc/modules/admin/what-extensions.php b/inc/modules/admin/what-extensions.php index a8196dd43a..10641a5907 100644 --- a/inc/modules/admin/what-extensions.php +++ b/inc/modules/admin/what-extensions.php @@ -358,15 +358,6 @@ ORDER BY 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')) { @@ -376,6 +367,15 @@ ORDER BY 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--}');