Fixes for sending pool / setter
authorRoland Häder <roland@mxchange.org>
Wed, 28 Oct 2009 21:54:50 +0000 (21:54 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 28 Oct 2009 21:54:50 +0000 (21:54 +0000)
inc/functions.php
inc/modules/admin/what-unlock_emails.php
inc/pool/pool-user.php
inc/request-functions.php

index c55b421..e32114a 100644 (file)
@@ -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
index de718c1..8bdde01 100644 (file)
@@ -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",
index 29e87dd..49e4913 100644 (file)
@@ -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
index f4486a5..69e361e 100644 (file)
@@ -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