Renamed ifSqlHasZeroNums() to ifSqlHasZeroNumRows() and improved some queries.
[mailer.git] / inc / fix_refsystem.php
index a932a5c..c4200c8 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Refback-Tabelle mit allen Refs generieren        *
  * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $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 *
@@ -42,7 +37,7 @@ if (!defined('__SECURITY')) {
 
 // Sanity-check: Is there ref level 0? If so, this must be fixed to NULL and `level` must be increased by one
 $result = sqlQuery('SELECT `id` FROM `{?_MYSQL_PREFIX?}_refsystem` WHERE `level`=0', __FILE__, __LINE__);
-if (!ifSqlHasZeroNums($result)) {
+if (!ifSqlHasZeroNumRows($result)) {
        // Remove index temporaly
        sqlQueryAlterTable('ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` DROP INDEX `userid_level`', __FILE__, __LINE__);
 
@@ -74,7 +69,7 @@ ORDER BY
        `userid` ASC', __FILE__, __LINE__);
 
 // Are there entries?
-if (!ifSqlHasZeroNums($result_direct)) {
+if (!ifSqlHasZeroNumRows($result_direct)) {
        // When 'walk' through all users
        while ($content = sqlFetchArray($result_direct)) {
                // Update refback table