]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-unlock_emails.php
A lot calls saved, expression language rewritten:
[mailer.git] / inc / modules / admin / what-unlock_emails.php
index c8d9ef649efa2a8945198ea28e3f834acea11238..a7c5a861dfcf2b47fd2c357f0bf29bbfb76b55ab 100644 (file)
@@ -93,7 +93,7 @@ LIMIT 1",
                                        } // END - if
 
                                        // Check for bonus extension version >= 0.4.4 for the order bonus
-                                       if ((isExtensionInstalledAndNewer('bonus', '0.4.4')) && (getConfig('bonus_active') == 'Y')) {
+                                       if ((isExtensionInstalledAndNewer('bonus', '0.4.4')) && (ifBonusRallyeActive())) {
                                                // Add points directly
                                                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `bonus_order`=`bonus_order`+{?bonus_order?} WHERE `userid`=%s LIMIT 1",
                                                        array(bigintval($content['sender'])), __FILE__, __LINE__);
@@ -126,7 +126,7 @@ LIMIT 1",
        } elseif (isPostRequestParameterSet(('reject'))) {
                if (countPostSelection() > 0) {
                        // Reject mail orders
-                       $OUT = ''; $SW = 2;
+                       $OUT = '';
                        foreach (postRequestParameter('sel') as $id => $value) {
                                // Secure id number
                                $id = bigintval($id);
@@ -146,7 +146,7 @@ LIMIT 1",
                                sendEmail($content['sender'], '{--MEMBER_ORDER_REJECTED--}', $message_user);
 
                                // If you do not enter an URL to redirect to, your URL will be set!
-                               if ((!isPostRequestParameterSet('redirect')) || (postRequestParameter('redirect') == 'http://')) setPostRequestParameter('redirect', getConfig('URL'));
+                               if ((!isPostRequestParameterSet('redirect')) || (postRequestParameter('redirect') == 'http://')) setPostRequestParameter('redirect', getUrl());
 
                                // Redirect URL
                                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET url='%s', `data_type`='NEW' WHERE `id`=%s LIMIT 1",
@@ -154,15 +154,13 @@ LIMIT 1",
 
                                // Prepare data for the row template
                                $content = array(
-                                       'sw'  => $SW,
                                        'id'  => $id,
                                        'url' => postRequestParameter('url', $id),
                                );
 
                                // Load row template and switch colors
                                $OUT .= loadTemplate('admin_unlock_emails_redir_row', true, $content);
-                               $SW = 3 - $SW;
-                       }
+                       } // END - foreach
 
                        // Load main template
                        loadTemplate('admin_unlock_emails_redir', false, $OUT);
@@ -193,15 +191,13 @@ LIMIT 1",
                loadTemplate('admin_settings_saved', false, '{--ADMIN_URLS_BLOCKED--}');
        } elseif ((!isFormSent('lock')) && (!isFormSent('accept')) && (!isFormSent('reject'))) {
                // Mail orders are in pool so we can display them
-               $OUT = ''; $SW = 2;
+               $OUT = '';
                while ($content = SQL_FETCHARRAY($result_main)) {
                        // Prepare data for the template
-                       $content['sw']        = $SW;
                        $content['timestamp'] = generateDateTime($content['timestamp'], 2);
 
                        // Load row template and switch colors
                        $OUT .= loadTemplate('admin_unlock_emails_row', true, $content);
-                       $SW = 3 - $SW;
                } // END - while
 
                // Free memory