From: quix0r Date: Sat, 29 Sep 2012 13:19:17 +0000 (+0000) Subject: Do not rebuild cache if it is already rebuild X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e099284e049cf10b2ab5c005a7b1c03c730d9f02;p=mailer.git Do not rebuild cache if it is already rebuild --- diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php index 90d1a92ab0..827762c4c3 100644 --- a/inc/extensions-functions.php +++ b/inc/extensions-functions.php @@ -961,7 +961,7 @@ function doActivateExtension ($ext_name) { } // Deactivate given extension -function doDeactivateExtension ($ext_name) { +function doDeactivateExtension ($ext_name, $inRebuild = false) { // Is the extension installed? if (!isExtensionInstalled($ext_name)) { // Non-installed extensions cannot be activated @@ -978,8 +978,11 @@ function doDeactivateExtension ($ext_name) { // Create new task (we ignore the task id here) createExtensionDeactivationTask($ext_name); - // Rebuild cache - rebuildCache('extension', 'extension'); + // Do not rebuild cache if it is already been rebuild + if ($inRebuild === false) { + // Rebuild cache + rebuildCache('extension', 'extension'); + } // END - if // Notify the admin sendAdminNotification(