X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions.php;h=eb6ba10c3f3880131f604f07380e121ae5c3cd9b;hp=d21e3b4d13d7f2e444790782dfec42774edcf3d3;hb=e32b39ab4a4cd504b2e27a238dac38b1a3c9d560;hpb=6d348813375b48ecd6344d52ec2b821046c353a9 diff --git a/inc/extensions.php b/inc/extensions.php index d21e3b4d13..eb6ba10c3f 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -434,6 +434,12 @@ function GET_EXT_VERSION ($ext_name) { // By default no extension is found $ext_ver = false; + // Empty extension name should be fixed! + if (empty($ext_name)) { + // Please report this bug! + debug_report_bug(__FUNCTION__.": ext_name is empty which is not allowed here."); + } // END - if + // Extensions are all inactive during installation if ((!isInstalled()) || (isInstalling())) return ""; //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": ext_name={$ext_name}"); @@ -734,13 +740,16 @@ function CREATE_NEW_EXTENSION_TASK ($admin_id, $subject, $ext) { $ext ); - // Load text for task + // Set default message if ext-foo is missing + $msg = sprintf(getMessage('ADMIN_EXT_TEXT_FILE_MISSING'), $ext); + + // Load text for task if found if (FILE_READABLE($tpl)) { // Load extension's own text template (HTML!) $msg = LOAD_TEMPLATE("ext_".$ext, true); } else { - // Load default message - $msg = LOAD_TEMPLATE("admin_new_ext", "", 0); + // Write this in debug.log as well + DEBUG_LOG(__FUNCTION__, __LINE__, $msg); } // Task not created so it's a brand-new extension which we need to register and create a task for!