]> git.mxchange.org Git - mailer.git/blobdiff - inc/gen_refback.php
More rewrites to make use of (cached) wrapper functions
[mailer.git] / inc / gen_refback.php
index 51f01e2622ea480ace3559d799defb991bc10e1d..0ffa66449a0c5dc706b2870e2a129de1ff5bc2cc 100644 (file)
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-}
+} // END - if
 
 // Make sure our functions are there
 loadIncludeOnce('inc/libs/refback_functions.php');
 
 // Sanity-check: Do we have ref level 0?
 $result = SQL_QUERY("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refsystem` WHERE `level`=0", __FILE__, __LINE__);
-if (SQL_NUMROWS($result) > 0) {
+if (!SQL_HASZERONUMS($result)) {
        // Remove index temporaly
        SQL_ALTER_TABLE("ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` DROP INDEX `userid_level`", __FILE__, __LINE__);
 
@@ -78,7 +78,7 @@ ORDER BY
        u.userid ASC', __FILE__, __LINE__);
 
 // Do we have entries?
-if (SQL_NUMROWS($result_direct) > 0) {
+if (!SQL_HASZERONUMS($result_direct) > 0) {
        // When 'walk' through all users
        while ($content = SQL_FETCHARRAY($result_direct)) {
                // Init level