From: Roland Häder Date: Wed, 28 Oct 2009 21:54:50 +0000 (+0000) Subject: Fixes for sending pool / setter X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0b155b195d86e46a8f19bf1b2e0ef45a4438b715;p=mailer.git Fixes for sending pool / setter --- diff --git a/inc/functions.php b/inc/functions.php index c55b421dd3..e32114a46e 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -44,7 +44,8 @@ if (!defined('__SECURITY')) { // Output HTML code directly or 'render' it. You addionally switch the new-line character off function outputHtml ($htmlCode, $newLine = true) { // Transfer username - $username = getUsername(); + $username = getMessage('USERNAME_UNKNOWN'); + if (isset($GLOBALS['username'])) $username = getUsername(); // Do we have HTML-Code here? if (!empty($htmlCode)) { @@ -559,8 +560,12 @@ function loadEmailTemplate ($template, $content = array(), $UID = '0') { unset($content); unset($DATA); - // Return compiled content - return compileCode($newContent); + // Compile the code and eval it + $eval = '$newContent = "' . compileCode(addSmartSlashes($newContent)) . '";'; + eval($eval); + + // Return content + return $newContent; } // Send mail out to an email address diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index de718c1dc3..8bdde01352 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -118,7 +118,7 @@ LIMIT 1", $message_user = loadEmailTemplate('order-accept', array(), $DATA['sender']); // Send email - sendEmail($DATA['sender'], MEMBER_ORDER_ACCEPTED, $message_user); + sendEmail($DATA['sender'], getMessage('MEMBER_ORDER_ACCEPTED'), $message_user); // Unlock selected email SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `data_type`='NEW' WHERE `id`=%s AND `data_type`='ADMIN' LIMIT 1", diff --git a/inc/pool/pool-user.php b/inc/pool/pool-user.php index 29e87ddafd..49e4913d07 100644 --- a/inc/pool/pool-user.php +++ b/inc/pool/pool-user.php @@ -215,7 +215,7 @@ if (SQL_NUMROWS($result_main) > 0) { $mailText = loadEmailTemplate('done-member', $content, $DATA['sender']); // Send it also waway - sendEmail($email, MEMBER_SUBJ_SEND_DONE, $mailText); + sendEmail($email, getMessage('MEMBER_SUBJ_SEND_DONE'), $mailText); } // END - if // Free result diff --git a/inc/request-functions.php b/inc/request-functions.php index f4486a5c6f..69e361e657 100644 --- a/inc/request-functions.php +++ b/inc/request-functions.php @@ -114,7 +114,7 @@ function setRequestGetElement ($element, $value) { $GLOBALS['raw_request']['get'][$element] = $value; // Update cache - $GLOBALS['cache_request']['request_get'][$element][null] = $value; + $GLOBALS['cache_request']['request_get'][$element] = $value; } // Wrapper for elements in $_POST