X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=inc%2Fgen_refback.php;h=e9073dae38dc1f1b8727db6b75928c26b0139ad0;hb=9bd2c18e0ae9ff758e566817cf811f84bc023748;hp=ce8f8654f94d56dffc689b4051c1d9e290639871;hpb=21a24662ddc70624c27c607e3904aab23e893898;p=mailer.git
diff --git a/inc/gen_refback.php b/inc/gen_refback.php
index ce8f8654f9..e9073dae38 100644
--- a/inc/gen_refback.php
+++ b/inc/gen_refback.php
@@ -1,7 +1,7 @@
0) {
// Remove index temporaly
- SQL_ALTER_TABLE("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `userid_level`", __FILE__, __LINE__);
+ SQL_ALTER_TABLE("ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` DROP INDEX `userid_level`", __FILE__, __LINE__);
// Upgrade refsystem, ref-level 0 is silly here
- SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_refsystem` SET level=level+1", __FILE__, __LINE__);
+ SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_refsystem` SET `level`=`level`+1", __FILE__, __LINE__);
// Add it again
- SQL_ALTER_TABLE("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` ADD UNIQUE `userid_level` ( `userid` , `level` )", __FILE__, __LINE__);
+ SQL_ALTER_TABLE("ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` ADD UNIQUE `userid_level` ( `userid`,`level` )", __FILE__, __LINE__);
// Rebuild cache
- rebuildCacheFiles("refsystem", "refsystem");
+ rebuildCache('refsystem', 'refsystem');
} // END - if
// Free result
SQL_FREERESULT($result);
// Reset the table
-SQL_QUERY("TRUNCATE TABLE `{!_MYSQL_PREFIX!}_user_refs`", __FILE__, __LINE__);
+SQL_QUERY('TRUNCATE TABLE `{?_MYSQL_PREFIX?}_user_refs`', __FILE__, __LINE__);
// Begin with all users in level one
-$result_direct = SQL_QUERY("SELECT u.userid
-FROM `{!_MYSQL_PREFIX!}_user_data` AS u
+$result_direct = SQL_QUERY('SELECT u.userid
+FROM `{?_MYSQL_PREFIX?}_user_data` AS u
WHERE u.refid=0
-ORDER BY u.userid ASC", __FILE__, __LINE__);
+ORDER BY u.userid ASC', __FILE__, __LINE__);
// Do we have entries?
if (SQL_NUMROWS($result_direct) > 0) {
- // When "walk" through all users
+ // When 'walk' through all users
while ($content = SQL_FETCHARRAY($result_direct)) {
// Init level
- $GLOBALS['cache_array']['back_level'] = 1;
+ $GLOBALS['refback_level'] = 1;
// Update refback table
- //* DEBUG: */ echo "uid={$content['userid']}
\n";
- UPDATE_REFBACK_TABLE($content['userid']);
+ //* DEBUG: */ outputHtml("userid={$content['userid']}
");
+ updateRefbackTable($content['userid']);
} // END - while
} // END - if