]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions.php
Fixes for #113, task texts where too much secured, resolved
[mailer.git] / inc / extensions.php
index c2dd63532587979c36cb430edb314d9e68df397a..609af2b242d05b2f64fa294cfc57ff0348cc3093 100644 (file)
@@ -746,7 +746,7 @@ function CREATE_NEW_EXTENSION_TASK ($admin_id, $subject, $ext) {
                // Load text for task if found
                if (FILE_READABLE($tpl)) {
                        // Load extension's own text template (HTML!)
-                       $msg = LOAD_TEMPLATE("ext_".$ext, true);
+                       $msg = LOAD_TEMPLATE("ext_" . $ext, true);
                } else {
                        // Write this in debug.log as well
                        DEBUG_LOG(__FUNCTION__, __LINE__, $msg);
@@ -754,12 +754,12 @@ function CREATE_NEW_EXTENSION_TASK ($admin_id, $subject, $ext) {
 
                // Task not created so it's a brand-new extension which we need to register and create a task for!
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (assigned_admin, userid, status, task_type, subject, text, task_created)
-VALUES (%s,0,'NEW','EXTENSION','%s','%s',UNIX_TIMESTAMP())",
+VALUES (%s, 0, 'NEW', 'EXTENSION', '%s', '%s', UNIX_TIMESTAMP())",
                        array(
                                $admin_id,
                                $subject,
-                               SQL_ESCAPE($msg),
-                       ),  __FUNCTION__, __LINE__, true, false
+                               smartAddSlashes($msg),
+                       ),  __FUNCTION__, __LINE__, true, false, false
                );
        } // END - if
 }
@@ -773,7 +773,7 @@ function CREATE_EXTENSION_DEACTIVATION_TASK ($ext) {
        if ((DETERMINE_TASK_ID_BY_SUBJECT($subject) == 0) && (GET_EXT_VERSION($ext) != "")) {
                // Task not created so add it
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (assigned_admin, userid, status, task_type, subject, text, task_created)
-VALUES (0,0,'NEW','EXTENSION_DEACTIVATION','%s','%s',UNIX_TIMESTAMP())",
+VALUES (0, 0, 'NEW', 'EXTENSION_DEACTIVATION', '%s', '%s', UNIX_TIMESTAMP())",
                        array(
                                $subject,
                                SQL_ESCAPE(LOAD_TEMPLATE("task_ext_deactivated", true, $ext)),