]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-email_details.php
Several fixes for broken actions (sorry for lame text)
[mailer.git] / inc / modules / admin / what-email_details.php
index a71abbac3a4310215734e548f823e6821402a4b8..dada51d2cb9a6c7df79a35286a06f64bdf213be2 100644 (file)
@@ -82,7 +82,7 @@ ORDER by timestamp DESC";
        $WHO = getMessage('USER_ID').": ".getRequestElement('userid');
 }
 
-if ((isExtensionActive('bonus')) && ($WHO == _ALL)) {
+if ((isExtensionActive('bonus')) && ($WHO == getMessage('_ALL'))) {
        // Bonus mails sent by you
        //               0     1       2        3        4      5       6          7       8      9         10          11        12
        $SQL2 = "SELECT id, subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent, clicks
@@ -124,7 +124,7 @@ if (!isGetRequestElementSet(('mid'))) {
 
 // Run SQL query for normal mails
 $result_list = SQL_QUERY($sql, __FILE__, __LINE__);
-if ((!empty($SQL2)) && ($WHO == _ALL)) $result_bonus = SQL_QUERY($SQL2, __FILE__, __LINE__);
+if ((!empty($SQL2)) && ($WHO == getMessage('_ALL'))) $result_bonus = SQL_QUERY($SQL2, __FILE__, __LINE__);
 
 // Calculate pages
 $PAGES = 0;
@@ -143,7 +143,7 @@ if (SQL_NUMROWS($result_list) > 0) {
        // Walk through all entries
        while ($pool = SQL_FETCHARRAY($result_list)) {
                // Unconfirmed mails and sent mails
-               $result_uncon = SQL_QUERY_ESC("SELECT max_rec, clicks FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE pool_id=%s LIMIT 1",
+               $result_uncon = SQL_QUERY_ESC("SELECT max_rec, clicks FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `pool_id`=%s LIMIT 1",
                array(bigintval($pool['id'])), __FILE__, __LINE__);
                list($pool['sent_email'], $pool['clicks']) = SQL_FETCHROW($result_uncon);
                SQL_FREERESULT($result_uncon);
@@ -187,13 +187,13 @@ if (SQL_NUMROWS($result_list) > 0) {
        loadTemplate('admin_list_emails', false, $content);
 
        $MAIL = true;
-       if ((isExtensionActive('bonus')) && ($WHO == _ALL)) {
+       if ((isExtensionActive('bonus')) && ($WHO == getMessage('_ALL'))) {
                // Check only if bonus extension is active
                if (SQL_NUMROWS($result_bonus) > 0) outputHtml('<br /><br />');
        }
 }
 
-if ((isExtensionActive('bonus')) && ($WHO == _ALL)) {
+if ((isExtensionActive('bonus')) && ($WHO == getMessage('_ALL'))) {
        // Load bonus mails only when extension is active
        if (SQL_NUMROWS($result_bonus) > 0) {
                // Calculate pages