// 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}");
$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!