// Some security stuff...
if ((!defined('__SECURITY')) || (!isAdmin())) {
die();
-}
+} // END - if
// Add description as navigation point
addMenuDescription('admin', __FILE__);
// Load email template and send the email away
$message_user = loadEmailTemplate('order-deleted', $content, $sender);
- sendEmail($sender, getMessage('MEMBER_ORDER_DELETED'), $message_user);
+ sendEmail($sender, '{--MEMBER_ORDER_DELETED--}', $message_user);
// Fetch right stats_id from pool
$result_pool = SQL_QUERY_ESC("SELECT
// Pay back points
//* DEBUG: */ debugOutput('PAYBACK:'.$sender);
- addPointsThroughReferalSystem('mail_deleted', $sender, $totalPoints, true, 0, false,'direct');
+ addPointsDirectly('mail_deleted', $sender, $totalPoints);
// Output message
if (getConfig('repay_deleted_mails') == 'REPAY') {
loadTemplate('admin_settings_saved', false, '{--ADMIN_USER_STATS_REMOVED--}');
} elseif ((isGetRequestParameterSet('bid')) && (isExtensionActive('bonus'))) {
// Load data from bonus mail
- $result = SQL_QUERY_ESC("SELECT `id`, `subject`, `url`, `timestamp`, `mails_sent` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s",
+ $result = SQL_QUERY_ESC("SELECT `id`, `subject`, `url`, `timestamp`, `mails_sent` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
array(bigintval(getRequestParameter('bid'))), __FILE__, __LINE__);
// Delete mail only once
$cnt += SQL_AFFECTEDROWS();
// Prepare data for the template
- $content['url'] = generateDerefererUrl($content['url']);
$content['timestamp'] = generateDateTime($content['timestamp'], 0);
$content['cnt'] = $cnt;
SQL_FREERESULT($result);
} elseif ((isGetRequestParameterSet('nid')) && (isExtensionInstalledAndNewer('bonus', '0.8.7'))) {
// Load data from bonus mail
- $result = SQL_QUERY_ESC("SELECT `id`, `subject`, `url`, `timestamp` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s",
+ $result = SQL_QUERY_ESC("SELECT `id`, `subject`, `url`, `timestamp` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
array(bigintval(getRequestParameter('nid'))), __FILE__, __LINE__);
// Delete mail only once
$cnt += SQL_AFFECTEDROWS();
// Prepare data for the template
- $content['url'] = generateDerefererUrl($content['url']);
$content['timestamp'] = generateDateTime($content['timestamp'], 0);
$content['cnt'] = $cnt;