]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions.php
Rewritten extension handling, if no ext-foo.tpl is there, some cosmetics applied
[mailer.git] / inc / extensions.php
index 11cf83c782903240b5a51600d3ed4573f125c7c1..eb6ba10c3f3880131f604f07380e121ae5c3cd9b 100644 (file)
@@ -740,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!