X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-order.php;h=c2139f52eab7b237f2fd240fc0c6817f225514c1;hb=4f2414a0134da82027fce8a6c98696a207c8c8cc;hp=b214a719c614beb8a81c0a429909c4784ef17b04;hpb=d92d8b4ddd219b65df8e0bba5e4354c0bbfba5c9;p=mailer.git diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index b214a719c6..c2139f52ea 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -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); @@ -275,7 +272,7 @@ LIMIT 1", // Update receiver list SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `receive_mails`=`receive_mails`-1 WHERE `userid` IN (%s) LIMIT %s", - array(str_replace(';', ", ", $RECEIVER), $content['target_send']), __FILE__, __LINE__); + array(convertReceivers($RECEIVER), $content['target_send']), __FILE__, __LINE__); // Is calculated max receivers larger than wanted receivers then reset it if ($content['target_send'] > postRequestElement('receiver')) $content['target_send'] = bigintval(postRequestElement('receiver')); @@ -284,12 +281,12 @@ LIMIT 1", $USED = $content['target_send'] * getPaymentPoints(bigintval(postRequestElement('type'))); // Fix empty zip code - if (!isPostRequestElementSet('zip')) setRequestPostElement('zip', '0'); + if (!isPostRequestElementSet('zip')) setRequestPostElement('zip', 0); // Check if he has enougth points for this order and selected more than 0 receivers if (($USED > 0) && ($USED <= $total) && ($content['target_send'] > 0)) { // Gettings points is okay, so we can add $USED later from - if (($id == '0') || ($type != 'TEMP')) { + if (($id == 0) || ($type != 'TEMP')) { // New order $id = 0; if (isExtensionActive('html_mail')) { @@ -424,7 +421,7 @@ LIMIT 1", } elseif (($ALLOWED == 0) && (getConfig('order_max_full') == 'ORDER')) { // No more mail orders allowed loadTemplate('admin_settings_saved', false, getMessage('MEMBER_ORDER_ALLOWED_EXHAUSTED')); -} elseif (($links < getConfig('unconfirmed')) && ($mmails == '1')) { +} elseif (($links < getConfig('unconfirmed')) && ($mmails == 1)) { // Display order form $result_cats = SQL_QUERY("SELECT `id`, `cat` @@ -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--}'; } @@ -684,7 +681,7 @@ LIMIT 1", // No cateogries are defined yet loadTemplate('admin_settings_saved', false, "{--MEMBER_NO_CATS--}"); } -} elseif ($mmails == '0') { +} elseif ($mmails == 0) { // Please set more than 0 mails per day loadTemplate('admin_settings_saved', false, getMessage('MEMBER_HAS_ZERO_MMAILS')); } else {