X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=010cad850080d80485c4f72b0e44db0ca4d2ecc9;hp=8ac91e556901e68696ead6e560043abac61bc4ca;hb=f928ad2bed60fa256d0641eaf6d2c027a2944688;hpb=9d3b6045b267bd17eb017f458f24122918df132c
diff --git a/inc/functions.php b/inc/functions.php
index 8ac91e5569..010cad8500 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -238,7 +238,7 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) {
// @DEPRECATED Try to rewrite the if() condition
if ($template == 'member_support_form') {
// Support request of a member
- $result = SQL_QUERY_ESC("SELECT `userid`, `gender`, `surname`, `family`, `email` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `userid`, `gender`, `surname`, `family`, `email` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1",
array(getUserId()), __FUNCTION__, __LINE__);
// Is content an array?
@@ -799,13 +799,13 @@ function LOAD_EMAIL_TEMPLATE ($template, $content = array(), $UID = '0') {
if (EXT_IS_ACTIVE('nickname')) {
//* DEBUG: */ print __FUNCTION__."(".__LINE__."):NICKNAME!
\n";
// Load nickname
- $result = SQL_QUERY_ESC("SELECT surname, family, gender, email, nickname FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($UID)), __FUNCTION__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT `surname`, `family`, `gender`, `email`, `nickname` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1",
+ array(bigintval($UID)), __FUNCTION__, __LINE__);
} else {
//* DEBUG: */ print __FUNCTION__."(".__LINE__."):NO-NICK!
\n";
/// Load normal data
- $result = SQL_QUERY_ESC("SELECT surname, family, gender, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($UID)), __FUNCTION__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT `surname`, `family`, `gender`, `email` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1",
+ array(bigintval($UID)), __FUNCTION__, __LINE__);
}
// Fetch and merge data
@@ -922,7 +922,7 @@ function redirectToUrl ($URL) {
} // END - if
// Three different debug ways...
- //* DEBUG: */ debug_report_bug(sprintf("%s[%s:] URL=%s", __FUNCTION__, __LINE__, $URL));
+ /* DEBUG: */ debug_report_bug(sprintf("%s[%s:] URL=%s", __FUNCTION__, __LINE__, $URL));
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, $URL);
//* DEBUG: */ die($URL);
@@ -2026,10 +2026,10 @@ function generateEmailLink ($email, $table = 'admins') {
$EMAIL = generateAdminEmailLink($email);
} elseif ((EXT_IS_ACTIVE('user')) && (GET_EXT_VERSION('user') >= '0.3.3') && ($table == 'user_data')) {
// Create email link for contacting a member within admin area (or later in other areas, too?)
- $EMAIL = generateEmailLink($email, 'user_data');
+ $EMAIL = generateUserEmailLink($email, 'admin');
} elseif ((EXT_IS_ACTIVE('sponsor')) && ($table == 'sponsor_data')) {
// Create email link to contact sponsor within admin area (or like the link above?)
- $EMAIL = generateEmailLink($email, 'sponsor_data');
+ $EMAIL = generateSponsorEmailLink($email, 'sponsor_data');
}
// Shall I close the link when there is no admin?