X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffix_refsystem.php;h=bf874dbc2f9082496569fb22222143f91c1e5e0d;hp=916795cd0fc3cb526672c55f331b0fd574a9df08;hb=8fad776382e63b3f73f8dbe289f229d79cfc2c22;hpb=31281c21661cd6329c45305a0544268388801791;ds=sidebyside diff --git a/inc/fix_refsystem.php b/inc/fix_refsystem.php index 916795cd0f..bf874dbc2f 100644 --- a/inc/fix_refsystem.php +++ b/inc/fix_refsystem.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { die(); } // END - if -// Sanity-check: Do we have ref level 0? If so, this must be fixed to NULL and `level` must be increased by one +// Sanity-check: Is there ref level 0? If so, this must be fixed to NULL and `level` must be increased by one $result = SQL_QUERY('SELECT `id` FROM `{?_MYSQL_PREFIX?}_refsystem` WHERE `level`=0', __FILE__, __LINE__); if (!SQL_HASZERONUMS($result)) { // Remove index temporaly @@ -68,17 +68,19 @@ $result_direct = SQL_QUERY('SELECT FROM `{?_MYSQL_PREFIX?}_user_data` WHERE - `refid`=0 OR `refid` IS NULL + `refid`=0 OR + `refid` IS NULL ORDER BY `userid` ASC', __FILE__, __LINE__); -// Do we have entries? +// Are there entries? if (!SQL_HASZERONUMS($result_direct)) { // When 'walk' through all users while ($content = SQL_FETCHARRAY($result_direct)) { // Update refback table - //* DEBUG: */ debugOutput('userid=' . $content['userid']); - updateReferalTable($content['userid']); + /* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'userid=' . $content['userid'] . ' - BEFORE!'); + updateReferralTable($content['userid']); + /* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'userid=' . $content['userid'] . ' - AFTER!'); } // END - while } // END - if