]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-unconfirmed.php
Renamed function, used more "pool functions":
[mailer.git] / inc / modules / member / what-unconfirmed.php
index 34515878f862b59cbd8472f2f3639432aff8da15..2b2810191d86f1c7111f0251602bacd687f52a88 100644 (file)
@@ -103,30 +103,24 @@ LIMIT 1',
 } elseif (isGetRequestElementSet('mailid')) {
        // Display regular member mail by loading its full data
        $result_data = SQL_QUERY_ESC("SELECT
-       `s`.`id`,
-       `s`.`subject`,
-       `p`.`text`,
-       `s`.`timestamp_ordered` AS `timestamp`,
-       `s`.`cat_id`,
-       `p`.`payment_id`,
-       `p`.`sender`,
-       `p`.`data_type`
+       `id` AS `stats_id`,
+       `pool_id`,
+       `subject`,
+       `timestamp_ordered`,
+       `cat_id`,
 FROM
        `{?_MYSQL_PREFIX?}_user_stats` AS `s`
-LEFT JOIN
-       `{?_MYSQL_PREFIX?}_pool` AS `p`
-ON
-       s.pool_id=p.id
 WHERE
-       `s`.`id`=%s
+       `id`=%s
 LIMIT 1",
                array(bigintval(getRequestElement('mailid'))), __FILE__, __LINE__);
 
        // Load data
        $content = SQL_FETCHARRAY($result_data);
+       $content = merge_array($content, getPoolDataFromId($content['pool_id']));
 
        // Translate some data
-       $content['timestamp'] = generateDateTime($content['timestamp'], '2');
+       $content['timestamp_ordered'] = generateDateTime($content['timestamp_ordered'], '2');
        // @TODO This call cannot be saved as EL code cannot be "framed" in other EL code
        $content['userid'] = getMemberId();
        $content['user_mail_status'] = '{%message,MEMBER_MAIL_NORMAL_CONFIRMED_UNKNOWN=' . $content['id'] . '%}';