} 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'] . '%}';