]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-order.php
Rewrites not to init config in config-functions.php (some still remain, many untested)
[mailer.git] / inc / modules / member / what-order.php
index f7f6049d476c639335c05301b4b41911a7b90475..da97a0a3d36b2930c7f4b968f82ad37379398680 100644 (file)
@@ -57,9 +57,6 @@ $whereStatement = " WHERE `visible`='Y'";
 // Set undefined array elements
 if (isAdmin()) $whereStatement = '';
 
-// Minimum mails / order
-$content['min'] = getConfig('order_min');
-
 // Count unconfirmed mails
 $links = countSumTotalData(getUserId(), 'user_links', 'id', 'userid', true);
 
@@ -418,7 +415,7 @@ LIMIT 1",
                        $URL = 'modules.php?module=login&what=order&code=' . getCode('NO_RECS_LEFT');
                }
        }
-} elseif (postRequestElement('receiver') == 0) {
+} elseif (postRequestElement('receiver') == '0') {
        // Not enougth receivers selected
        $URL = 'modules.php?module=login&what=order&code=' . getCode('MORE_RECEIVERS1');
 } elseif (($ALLOWED == 0) && (getConfig('order_max_full') == 'ORDER')) {
@@ -473,8 +470,12 @@ LEFT JOIN
 ON
        d.userid=h.userid
 WHERE
-       d.userid=%s AND d.receive_mails > 0 AND d.`status`='CONFIRMED' AND d.`holiday_active`='Y' AND
-       h.holiday_start < UNIX_TIMESTAMP() AND h.holiday_end > UNIX_TIMESTAMP()
+       d.userid=%s AND
+       d.receive_mails > 0 AND
+       d.`status`='CONFIRMED' AND
+       d.`holiday_active`='Y' AND
+       h.holiday_start < UNIX_TIMESTAMP() AND
+       h.holiday_end > UNIX_TIMESTAMP()
 LIMIT 1",
                                                        array(bigintval($ucat)), __FILE__, __LINE__);
 
@@ -590,7 +591,7 @@ LIMIT 1",
                                } else {
                                        // Default output for that your members don't forget it...
                                        $content['url']         = 'http://';
-                                       $content['target_send'] = $content['min'];
+                                       $content['target_send'] = getConfig('order_min');
                                        $content['subject']     = '{--ORDER_DEFAULT_SUBJECT--}';
                                        $content['text']        = '{--ORDER_DEFAULT_TEXT--}';
                                }