]> git.mxchange.org Git - mailer.git/blobdiff - inc/gen_refback.php
Ref link fixed, nickname fixed, several rewrites, TODOs.txt updated:
[mailer.git] / inc / gen_refback.php
index e4b1fd45bc0f9cd816f0adfc5e66256915dbe8f0..421bcbdde32c4b7e13306794d59aad7ed8f602ae 100644 (file)
 
 // Some security stuff...
 if (!defined('__SECURITY')) {
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
        require($INC);
 }
 
 // Make sure our functions are there
-LOAD_INC_ONCE("inc/libs/refback_functions.php");
+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__);
+$result = SQL_QUERY("SELECT `id` FROM `{!_MYSQL_PREFIX!}_refsystem` WHERE level=0", __FILE__, __LINE__);
 if (SQL_NUMROWS($result) > 0) {
        // Remove index temporaly
        SQL_ALTER_TABLE("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `userid_level`", __FILE__, __LINE__);
@@ -81,8 +81,8 @@ if (SQL_NUMROWS($result_direct) > 0) {
                $GLOBALS['cache_array']['back_level'] = 1;
 
                // Update refback table
-               //* DEBUG: */ echo "uid={$content['userid']}<br />\n";
-               UPDATE_REFBACK_TABLE($content['userid']);
+               //* DEBUG: */ OUTPUT_HTML("uid={$content['userid']}<br />");
+               updateRefbackTable($content['userid']);
        } // END - while
 } // END - if