Renamed ifSqlHasZeroNums() to ifSqlHasZeroNumRows() and improved some queries.
[mailer.git] / inc / modules / member / what-transfer.php
index 6dea4dd47acb3245a8ea719a2b0ba6cfbdeff594..884e31b08df41383e8980ef408d08033f931768d 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2015 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -216,7 +216,7 @@ switch ($mode) {
                        $result = sqlQueryEscaped("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED'" . runFilterChain('user_exclusion_sql', ' ') . " AND `opt_in`='Y' AND `userid` != '%s' ORDER BY `userid` ASC",
                                array(getMemberId()), __FILE__, __LINE__);
 
-                       if (!ifSqlHasZeroNums($result)) {
+                       if (!ifSqlHasZeroNumRows($result)) {
                                // Load list
                                $OUT  = '<select name="to_userid" size="1" class="form_select">
        <option value="0">{--SELECT_NONE--}</option>';
@@ -234,7 +234,7 @@ switch ($mode) {
                                sqlFreeResult($result);
                        } else {
                                // No one else is opt-in
-                               $OUT = displayMessage('{--MEMBER_TRANSFER_NO_ONE_ELSE_OPT_IN--}', TRUE);
+                               $OUT = returnMessage('{--MEMBER_TRANSFER_NO_ONE_ELSE_OPT_IN--}');
                                $content['to_disabled'] = ' disabled="disabled"';
                        }
 
@@ -256,7 +256,7 @@ switch ($mode) {
                                $content['captcha_code'] = '<input type="hidden" name="code_chk" value="' . $rand . '" /><input type="text" name="code" class="form_field" size="5" maxlength="7"' . $content['to_disabled'] . ' />&nbsp;' . $img;
                        } else {
                                $code = '00000';
-                               $content['captcha_code'] = displayMessage('{--MEMBER_TRANSFER_NO_CODE--}', TRUE);
+                               $content['captcha_code'] = returnMessage('{--MEMBER_TRANSFER_NO_CODE--}');
                        }
 
                        // Init points/reason
@@ -300,7 +300,7 @@ switch ($mode) {
                $result = sqlQueryEscaped($sql, array(getMemberId()), __FILE__, __LINE__);
 
                // Are there entries?
-               if (!ifSqlHasZeroNums($result)) {
+               if (!ifSqlHasZeroNumRows($result)) {
                        $OUT = '';
                        while ($content = sqlFetchArray($result)) {
                                // Rewrite points, out is subtracted
@@ -386,7 +386,7 @@ INDEX (`party_userid`)
                        array(getMemberId()), __FILE__, __LINE__);
 
                $total = '0';
-               if (!ifSqlHasZeroNums($result)) {
+               if (!ifSqlHasZeroNumRows($result)) {
                        // Output rows
                        $OUT = '';
                        while ($content = sqlFetchArray($result)) {