]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions.php
More debug.log lines added, indent fixed in surfbar.php
[mailer.git] / inc / extensions.php
index fb0ae03c511e1e3db6ad53ad29c7b2936689869f..790c42639f72b2f72220788f10e6d85698508514 100644 (file)
@@ -61,6 +61,8 @@ function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = '', $EXT_VER = '', $dry_run
        if ((isset($GLOBALS['ext_loaded']['ext'][$ext_name])) && (empty($EXT_LOAD_MODE))) {
                // Debug message
                DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Extension %s already loaded.", $ext_name));
+
+               // Abort here
                return false;
        } // END - if
 
@@ -71,7 +73,7 @@ function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = '', $EXT_VER = '', $dry_run
        // Is the extension file NOT there?
        if (!isIncludeReadable($INC)) {
                // Debug message
-               DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Extension %s not found.", $ext_name));
+               DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Extension %s not found or not readable.", $ext_name));
 
                // Abort here
                return false;
@@ -86,7 +88,12 @@ function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = '', $EXT_VER = '', $dry_run
                //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "--- Language loaded.");
                $GLOBALS['ext_loaded']['lang'][$ext_name] = true;
                loadIncludeOnce($langInclude);
-       } // END - if
+       } else {
+               // No language file is not so good...
+               DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("WARNING: Extension %s has no language file or we cannot read from it. lang=%s",
+                       $ext_name, getLanguage()
+               ));
+       }
 
        // Construct FQFN for functions file
        $funcsInclude = sprintf("inc/libs/%s_functions.php", $ext_name);
@@ -97,6 +104,11 @@ function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = '', $EXT_VER = '', $dry_run
                //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "--- Functions loaded.");
                $GLOBALS['ext_loaded']['funcs'][$ext_name] = true;
                loadIncludeOnce($funcsInclude);
+       } else {
+               // No functions file is not so good...
+               DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("WARNING: Extension %s has no own functions file or we cannot read from it.",
+                       $ext_name
+               ));
        } // END - if
 
        // Extensions are not deprecated by default