case 'NORMAL':
$result_data = SQL_QUERY_ESC("SELECT
s.`subject`,
- s.`timestamp_ordered`,
+ s.`timestamp_ordered` AS `timestamp`,
s.`cat_id`,
s.`payment_id`,
p.`sender`
break;
case 'BONUS':
- $result_data = SQL_QUERY_ESC("SELECT `subject`, `timestamp`, `cat_id`, `points`, 0 FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
+ $result_data = SQL_QUERY_ESC("SELECT `subject`, `timestamp`, `cat_id`, `points`, NULL FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
array(bigintval($row['bonus_id'])), __FILE__, __LINE__);
$row['link_type'] = 'bonusid';
$data = $row['bonus_id'];
default: // Unknown type detected!
reportBug(__FILE__, __LINE__, sprintf("Unknown mail type %s detected.", $row['link_type']));
break;
- }
+ } // END - switch
// Data found to this mail?
if ((SQL_NUMROWS($result_data) == 1) && (($row['link_type'] == 'mailid') || ($row['link_type'] == 'bonusid'))) {
// Subject line found?
if (empty($subject)) {
// No subject line!
- $subject = '{--DEFAULT_SUBJECT_LINE--}';
+ $subject = '{--DEFAULT_SUBJECT--}';
} // END - if
// Prepare sender id