From dac6d0db6cce3da35e1ebf56960d5c05f640be59 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 12 Jul 2010 12:10:43 +0000 Subject: [PATCH] SQL fixes, rewrites to make better use of EL --- inc/modules/admin/what-email_details.php | 2 +- inc/modules/member/what-points.php | 19 ------------------- .../de/html/admin/admin_email_archiv_row.tpl | 2 +- templates/de/html/member/member_points.tpl | 6 +++--- 4 files changed, 5 insertions(+), 24 deletions(-) diff --git a/inc/modules/admin/what-email_details.php b/inc/modules/admin/what-email_details.php index f65302b6b0..83150be3e3 100644 --- a/inc/modules/admin/what-email_details.php +++ b/inc/modules/admin/what-email_details.php @@ -101,7 +101,7 @@ $result_bonus = false; if ((isExtensionActive('bonus')) && (empty($WHO))) { // Check for maximum pages $result_bonus = SQL_QUERY("SELECT - `id`, `subject`, `text`, `receivers`, `points`, `time`, `data_type`, `timestamp`, `url`, `cat_id`, `target_send`, `mails_sent`, `clicks` + `id`, `subject`, `text`, `receivers`, `points`, `time`, `data_type`, `timestamp`, `url`, `cat_id`, `target_send`, `mails_sent`, `clicks`, (`mails_sent` - `clicks`) AS `unconfirmed` FROM `{?_MYSQL_PREFIX?}_bonus` diff --git a/inc/modules/member/what-points.php b/inc/modules/member/what-points.php index 32200ad607..1b6db929f0 100644 --- a/inc/modules/member/what-points.php +++ b/inc/modules/member/what-points.php @@ -125,25 +125,6 @@ SQL_FREERESULT($result_depths); // Put rows to constant for the main template $content['rows'] = $OUT; -// Initialize variables -$content['confirmed'] = '---'; -$content['sent'] = '---'; -$content['receive'] = '---'; - -// Only user >= v0.1.2: Fetch confirmed mails counter -if (isExtensionInstalledAndNewer('user', '0.1.2')) { - $add = ''; - $content['confirmed'] = getUserData('mails_confirmed'); - - if (isExtensionInstalledAndNewer('user', '0.1.4')) { - $content['sent'] = getUserData('emails_sent'); - $content['receive'] = getUserData('emails_received'); - } // END - if -} // END - if - -// If TLOCK is 0 add 3 zeros for floating -if ($content['total_locked'] == '0') $content['total_locked'] = '0.00000'; - // Remember several values in constants $content['total_points'] = ($content['total_points'] - getUserData('used_points')); diff --git a/templates/de/html/admin/admin_email_archiv_row.tpl b/templates/de/html/admin/admin_email_archiv_row.tpl index a001ddb298..962b67230e 100644 --- a/templates/de/html/admin/admin_email_archiv_row.tpl +++ b/templates/de/html/admin/admin_email_archiv_row.tpl @@ -25,7 +25,7 @@ {--EMAIL_RECEIVERS--}:
- $content[sent] ({--EMAIL_RUIDS--}: + {%pipe,translateComma=$content[target_send]%} ({--EMAIL_RUIDS--}: {%pipe,convertReceivers=$content[receivers]%}) diff --git a/templates/de/html/member/member_points.tpl b/templates/de/html/member/member_points.tpl index bee1864414..7fc5f08ad5 100644 --- a/templates/de/html/member/member_points.tpl +++ b/templates/de/html/member/member_points.tpl @@ -31,7 +31,7 @@ {--RECEIVED_MAILS--}: - {%pipe,translateComma=$content[receive]%} + {%user,emails_received,translateComma%} - @@ -41,12 +41,12 @@ {--CONFIRMED_MAILS--}: - {%pipe,translateComma=$content[confirmed]%} + {%user,mails_confirmed,translateComma%} - {--SENT_MAILS--}: - {%pipe,translateComma=$content[sent]%} + {%user,emails_sent,translateComma%} - -- 2.39.5