]> git.mxchange.org Git - mailer.git/commitdiff
First purge cache files, then redirect ...
authorRoland Häder <roland@mxchange.org>
Sun, 4 Dec 2011 00:37:41 +0000 (00:37 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 4 Dec 2011 00:37:41 +0000 (00:37 +0000)
inc/modules/admin/what-extensions.php

index a8196dd43ae8ce58e395b4167df5dfd19375fe50..10641a59075988bc64f37c9f29f177afde137f50 100644 (file)
@@ -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&amp;what=extensions&amp;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&amp;what=extensions&amp;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--}');