X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions-functions.php;h=1d9027656f76f07ea216801e24c0a75d484c4b62;hp=daac4a821839455afe07eb3d7bca7ec1fbee2067;hb=f1308369312b448023e572dc12dec0da6a9b5e52;hpb=3396ef5550610949a8ecb01beb333da547cd619b diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php index daac4a8218..1d9027656f 100644 --- a/inc/extensions-functions.php +++ b/inc/extensions-functions.php @@ -610,17 +610,23 @@ function updateExtension ($ext_name, $ext_ver, $dry_run = false) { if (count($depencies) > 0) { // Apply all extension depencies foreach ($depencies as $ext_depend) { - // Set it as current - setCurrentExtensionName($ext_depend); - - // Is the extension there? - if (isExtensionInstalled($ext_depend)) { - // Update another extension first! - $test = updateExtension($ext_depend, getExtensionVersion($ext_depend), getExtensionDryRun()); - } else { - // Register new extension - $test = registerExtension($ext_depend, 0, getExtensionDryRun(), false); - } + // Did we already update/register this? + if (!isset($GLOBALS['ext_updated'][$ext_depend])) { + // Set it as current + setCurrentExtensionName($ext_depend); + + // Mark it as already updated before we update it + $GLOBALS['ext_updated'][$ext_depend] = true; + + // Is the extension there? + if (isExtensionInstalled($ext_depend)) { + // Update another extension first! + $test = updateExtension($ext_depend, getExtensionVersion($ext_depend), getExtensionDryRun()); + } else { + // Register new extension + $test = registerExtension($ext_depend, 0, getExtensionDryRun(), false); + } + } // END - if } // END - foreach // Set name back