Fixes for creating of new tasks (double escape breakes string) and mail debug code
authorRoland Häder <roland@mxchange.org>
Tue, 24 Nov 2009 07:03:49 +0000 (07:03 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 24 Nov 2009 07:03:49 +0000 (07:03 +0000)
inc/functions.php
inc/mysql-manager.php

index 8928e602fa428c51ab064641ff281a61e17d5e90..cc3c83d5f3754330c93f29192e9119d0c8031515 100644 (file)
@@ -586,10 +586,10 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '
        if (isDebugModeEnabled()) {
                // In debug mode we want to display the mail instead of sending it away so we can debug this part
                outputHtml('<pre>
-Headers : ' . str_replace('<', '&lt', str_replace('>', '&gt;', secureString(trim($mailHeader)))) . '
-To      : ' . $toEmail . '
-Subject : ' . $subject . '
-Message : ' . $message . '
+Headers : ' . htmlentities(trim($mailHeader)) . '
+To      : ' . htmlentities($toEmail) . '
+Subject : ' . htmlentities($subject) . '
+Message : ' . htmlentities($message) . '
 </pre>');
        } elseif (($isHtml == 'Y') && (isExtensionActive('html_mail'))) {
                // Send mail as HTML away
index c9fad71c38bd45b68868552f4ecc139b956bb10c..1e1069a6bd8dad8ae35a46d75e500fc7ebe017e7 100644 (file)
@@ -2121,7 +2121,13 @@ function reduceRecipientReceivedMails ($column, $id, $count) {
 function createNewTask ($subject, $notes, $taskType, $userid = '0', $adminId = '0', $strip = true) {
        // Insert the task data into the database
        SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_task_system` (`assigned_admin`, `userid`, `status`, `task_type`, `subject`, `text`, `task_created`) VALUES (%s,%s,'NEW','%s','%s','%s', UNIX_TIMESTAMP())",
-               array($adminId, $userid, $taskType, $subject, escapeQuotes($notes)), __FUNCTION__, __LINE__, true, $strip);
+               array(
+                       $adminId,
+                       $userid,
+                       $taskType,
+                       $subject,
+                       $notes
+               ), __FUNCTION__, __LINE__, true, $strip);
 }
 
 // Updates last module / online time