From 0b155b195d86e46a8f19bf1b2e0ef45a4438b715 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 28 Oct 2009 21:54:50 +0000 Subject: [PATCH] Fixes for sending pool / setter --- inc/functions.php | 11 ++++++++--- inc/modules/admin/what-unlock_emails.php | 2 +- inc/pool/pool-user.php | 2 +- inc/request-functions.php | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) 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 -- 2.39.2