X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fgen_refback.php;h=f551ef47b7591c74e7b59193e56a1fa6505a87ab;hb=b822c9bb96f24c045e2d5553415f5e20e008402b;hp=51f01e2622ea480ace3559d799defb991bc10e1d;hpb=1c4e78c5d68b97b82a3b930aa6db1e6df188f653;p=mailer.git diff --git a/inc/gen_refback.php b/inc/gen_refback.php index 51f01e2622..f551ef47b7 100644 --- a/inc/gen_refback.php +++ b/inc/gen_refback.php @@ -1,97 +1,3 @@ 0) { - // Remove index temporaly - 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__); - - // Add it again - SQL_ALTER_TABLE("ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` ADD UNIQUE `userid_level` ( `userid`,`level` )", __FILE__, __LINE__); - - // Rebuild cache - rebuildCache('refsystem', 'refsystem'); -} // END - if - -// Free result -SQL_FREERESULT($result); - -// Reset the table -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 -WHERE - u.refid=0 -ORDER BY - u.userid ASC', __FILE__, __LINE__); - -// Do we have entries? -if (SQL_NUMROWS($result_direct) > 0) { - // When 'walk' through all users - while ($content = SQL_FETCHARRAY($result_direct)) { - // Init level - $GLOBALS['refback_level'] = 1; - - // Update refback table - //* DEBUG: */ debugOutput('userid=' . $content['userid']); - updateRefbackTable($content['userid']); - } // END - while -} // END - if - -// Free result -SQL_FREERESULT($result_direct); - -// [EOF] +// @DEPRECATED ?>