Function loadLanguageFile() does now support extensions
[mailer.git] / inc / extensions.php
index c9865d7f835f205cabfbd4de8e9f5b91232eae5e..1b17f1101fac4658a573bf05fec6feb3d70bbd4d 100644 (file)
@@ -79,21 +79,8 @@ function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = '', $EXT_VER = '', $dry_run
                return false;
        } // END - if
 
-       // Construct FQFN for language file
-       $langInclude = sprintf("inc/language/%s_%s.php", $ext_name, getLanguage());
-
-       // Is this include there?
-       if ((isFileReadable($langInclude)) && (!isset($GLOBALS['ext_loaded']['lang'][$ext_name]))) {
-               // Then load it
-               //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "--- Language loaded.");
-               $GLOBALS['ext_loaded']['lang'][$ext_name] = true;
-               loadIncludeOnce($langInclude);
-       } elseif ((isDebugModeEnabled()) && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme')) {
-               // 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()
-               ));
-       }
+       // Load extension's own language file
+       loadLanguageFile($ext_name);
 
        // Construct FQFN for functions file
        $funcsInclude = sprintf("inc/libs/%s_functions.php", $ext_name);