From: Roland Häder Date: Sun, 1 Nov 2009 15:23:33 +0000 (+0000) Subject: Charset is now passed to PHPMailer, setOutputMode() does now cast to int, output... X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=f2736bc6457140146890877d992be862a78b259f Charset is now passed to PHPMailer, setOutputMode() does now cast to int, output mode is no longer automatically fixed --- diff --git a/inc/classes/rdf.class.php b/inc/classes/rdf.class.php index 7ab88f773e..dc1e85ca45 100644 --- a/inc/classes/rdf.class.php +++ b/inc/classes/rdf.class.php @@ -845,7 +845,7 @@ class fase4_rdf { * @access public * @author Stefan Saasen * @return array - * @see _array_item + * @see _array_item */ function get_array_item( ) { @@ -858,7 +858,7 @@ class fase4_rdf { * @access public * @author Stefan Saasen * @return array - * @see _array_textinput + * @see _array_textinput */ function get_array_textinput( ) { @@ -868,9 +868,9 @@ class fase4_rdf { /** * Getter for parser id from resource * - * @access private - * @author Roland Haeder - * @return int + * @access private + * @author Roland Haeder + * @return int */ function get_parser_id ($parser) { // Default is zero @@ -892,7 +892,7 @@ class fase4_rdf { * @access public * @author Stefan Saasen * @return array - * @see _array_image + * @see _array_image */ function get_array_image( ) { diff --git a/inc/functions.php b/inc/functions.php index 6cb2c7e564..21938e565e 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -353,7 +353,7 @@ function loadTemplate ($template, $return=false, $content=array()) { $ret = ''; if ((strpos($GLOBALS['tpl_content'], '$') !== false) || (strpos($GLOBALS['tpl_content'], '{--') !== false) || (strpos($GLOBALS['tpl_content'], '{!') !== false) || (strpos($GLOBALS['tpl_content'], '{?') !== false)) { // Normal HTML output? - if ($GLOBALS['output_mode'] == 0) { + if (getOutputMode() == 0) { // Add surrounding HTML comments to help finding bugs faster $ret = "\n" . $GLOBALS['tpl_content'] . "\n"; @@ -670,6 +670,11 @@ function sendRawEmail ($toEmail, $subject, $message, $from) { // get new instance $mail = new PHPMailer(); + + // Set charset to UTF-8 + $mail->CharSet('UTF-8'); + + // Path for PHPMailer $mail->PluginDir = sprintf("%sinc/phpmailer/", getConfig('PATH')); $mail->IsSMTP(); diff --git a/inc/libs/html_mail_functions.php b/inc/libs/html_mail_functions.php index f72b7d5955..6b951f8a00 100644 --- a/inc/libs/html_mail_functions.php +++ b/inc/libs/html_mail_functions.php @@ -144,7 +144,7 @@ function insertUrlsIntoHtml ($text) { $text = ''; $PARTS[] = $test; foreach ($PARTS as $part) { $text .= $part; - } + } // END - foreach // Replace new-lines agains
-s and finally compile possible own HTML tags out... return compileCode(str_replace("\n", "
\n", $text)); @@ -156,7 +156,7 @@ function sendHtmlEmail($to, $subject, $message, $FROM) { // Send mail away as HTML $FROM = "Content-Type: text/html; charset=UTF-8\n" . $FROM; sendEmail($to, $subject, $message, 'N', $FROM); - } + } // END - if } // diff --git a/inc/libs/yoomedia_functions.php b/inc/libs/yoomedia_functions.php index 588eea1ab4..47015d5224 100644 --- a/inc/libs/yoomedia_functions.php +++ b/inc/libs/yoomedia_functions.php @@ -221,7 +221,7 @@ function YOOMEDIA_PREPARE_MAIL_DELIVERY ($data) { $data['categories'] = generateCategoryOptionsList('normal'); // Decode entities - $data['text'] = (decodeEntities($data['text'])); + $data['text'] = decodeEntities($data['text']); // Load template loadTemplate('admin_send_yoomedia', false, $data); diff --git a/inc/mysql-connect.php b/inc/mysql-connect.php index a733ea9abd..11ed8a13e4 100644 --- a/inc/mysql-connect.php +++ b/inc/mysql-connect.php @@ -144,9 +144,6 @@ if (!isInstalling()) { setConfigEntry('OUTPUT_MODE', 'render'); } // END - if - // Set other missing variables - if (!isOutputModeSet()) setOutputMode(0); - // Include more foreach (array('inc/databases.php','inc/versions.php','inc/db/lib.php','inc/session.php','inc/install-functions.php','inc/load_config.php') as $inc) { // Load the include diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index f8b068dc35..b76f513d39 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -593,7 +593,7 @@ function getOutputMode () { // Setter for 'output_mode' value function setOutputMode ($newOutputMode) { - $GLOBALS['output_mode'] = SQL_ESCAPE($newOutputMode); + $GLOBALS['output_mode'] = (int) $newOutputMode; } // Checks wether output_mode is set and optionally aborts on miss