Fix for endless loop
[mailer.git] / inc / modules / member / what-order.php
index f7f6049d476c639335c05301b4b41911a7b90475..c2139f52eab7b237f2fd240fc0c6817f225514c1 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')) {
@@ -590,7 +587,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--}';
                                }