+function isExtensionProductive ($ext_name = '') {
+ // Is the extension name empty? Then use current
+ if (empty($ext_name)) {
+ // Get current extension name
+ $ext_name = getCurrentExtensionName();
+ } // END - if
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - ENTERED!');
+
+ // Do we have cache?
+ if (!isset($GLOBALS[__FUNCTION__][$ext_name])) {
+ // Load extension only if not yet loaded
+ if (!isset($GLOBALS['ext_productive'][$ext_name])) {
+ // Load extension in test mode
+ loadExtension($ext_name, 'test');
+ } // END - if
+
+ // Determine it
+ $GLOBALS[__FUNCTION__][$ext_name] = ((isset($GLOBALS['ext_productive'][$ext_name])) && ($GLOBALS['ext_productive'][$ext_name] === true));
+ } // END - if
+
+ // Return result
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',isProductive=', intval($GLOBALS[__FUNCTION__][$ext_name]) . ' - EXIT!');
+ return $GLOBALS[__FUNCTION__][$ext_name];
+}
+
+// Mark extension file as loaded
+function markExtensionAsLoaded ($ext_name) {
+ // Is it already loaded?
+ if (isExtensionLoaded($ext_name)) {
+ // Then abort here
+ debug_report_bug(__FUNCTION__, __LINE__, 'Extension ' . $ext_name . ' is already marked as loaded!');
+ } // END - if
+
+ // Mark it
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',ext_loaded=true');
+ $GLOBALS['ext_loaded']['ext_name'][$ext_name] = true;
+}
+
+// Determine wether the given extension is already loaded
+function isExtensionLoaded ($ext_name) {
+ // Is it there?
+ return ((isset($GLOBALS['ext_loaded']['ext_name'][$ext_name])) && ($GLOBALS['ext_loaded']['ext_name'][$ext_name] === true));
+}
+
+// Mark extension's library file as loaded
+function markExtensionLibraryAsLoaded ($ext_name) {
+ // Is it already loaded?
+ if (isExtensionLibraryLoaded($ext_name)) {
+ // Then abort here
+ debug_report_bug(__FUNCTION__, __LINE__, 'Extension library ' . $ext_name . ' is already marked as loaded!');
+ } // END - if
+
+ // Mark it
+ $GLOBALS['ext_loaded']['library'][$ext_name] = true;
+}
+
+// Determine wether the given extension's library is already loaded
+function isExtensionLibraryLoaded ($ext_name) {
+ // Is it there?
+ return ((isset($GLOBALS['ext_loaded']['library'][$ext_name])) && ($GLOBALS['ext_loaded']['library'][$ext_name] === true));