From 546449e88f44bffb20ae7d30ff92aad8928190bd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 4 Dec 2011 00:37:41 +0000 Subject: [PATCH] First purge cache files, then redirect ... --- inc/modules/admin/what-extensions.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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--}'); -- 2.39.5