+// Checks wether an update is already running for given extension
+function isExtensionUpdateRunning ($ext_name) {
+ // Current and given extensions means whole array
+ if ($ext_name == getCurrentExtensionName()) {
+ // Default is not found
+ $isRunning = false;
+
+ // Walk through whole array
+ foreach ($GLOBALS['ext_running_updates'] as $ext1=>$depends) {
+ // Is it found?
+ if (($ext1 == $ext_name) || ($isRunning === true)) {
+ // Found!
+ logDebugMessage(__FUNCTION__, __LINE__, 'ext1=' . $ext1 . ',ext_name=' . $ext_name . ',isRunning=' . intval($isRunning));
+ $isRunning = true;
+ break;
+ } // END - if
+ } // END - foreach
+
+ // Return result
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currentExtension=' . getCurrentExtensionName() . ',ext_name=' . $ext_name . ', isRunning=' . intval($isRunning));
+ return $isRunning;
+ } // END - if
+
+ // Simply check it
+ $isRunning = ((isExtensionUpdateDependenciesInitialized()) && (in_array($ext_name, getExtensionRunningUpdates())));
+
+ // Return it
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currentExtension=' . getCurrentExtensionName() . ',ext_name=' . $ext_name . ', isRunning=' . intval($isRunning));
+ return $isRunning;
+}
+