$userid = '---';
// List only users with at least one ref!
- //* DEBUG: */ print("*".$cnt.'/'.$content['userid'].'/'.$content['curr_points'].'/'.$refpoints."*<br />");
+ //* DEBUG: */ debugOutput('*'.$cnt.'/'.$content['userid'].'/'.$content['curr_points'].'/'.$refpoints.'*');
if (($cnt > 0) && ($refpoints > $content['curr_points'])) { $userid = $content['userid']; } else { $cnt = ''; }
// Save values to array
$cnt = '0';
foreach ($GLOBALS['cache_array']['refsystem']['userid'] as $id => $userid) {
// Do we have a ref for this user?
- //* DEBUG: */ print("id={$id},userid={$userid},userid={$userid},old={$old},level={$GLOBALS['cache_array']['refsystem']['level'][$id]}<br />");
+ //* DEBUG: */ debugOutput('id='.$id.',userid='.$userid.',userid='.$userid.',old='.$old.',level='.$GLOBALS['cache_array']['refsystem']['level'][$id]);
if (($currUserid == $userid) && ($GLOBALS['cache_array']['refsystem']['level'][$id] == 1)) {
- //* DEBUG: */ print("userid matches!<br />");
+ //* DEBUG: */ debugOutput('userid matches!');
foreach ($GLOBALS['cache_array']['refdepths']['level'] as $level) {
if (($level == $GLOBALS['cache_array']['refsystem']['level'][$id]) && ($level == 1)) {
// Level does exist so abort here
$cnt = $GLOBALS['cache_array']['refsystem']['counter'][$id];
- //* DEBUG: */ print("*".$userid.'/'.$cnt."*<br />");
+ //* DEBUG: */ debugOutput('*'.$userid.'/'.$cnt.'*');
break;
} elseif ($level > 1) {
// Not interesting here...
} // END - if
} // END - foreach
- //* DEBUG: */ print("<pre>");
- //* DEBUG: */ print(print_r($GLOBALS['cache_array']['refsystem'], true));
- //* DEBUG: */ print("</pre>");
+ //* DEBUG: */ debugOutput('<pre>'.print_r($GLOBALS['cache_array']['refsystem'], true).'</pre>');
//* DEBUG: */ shutdown();
if ($cnt > 0) {
incrementStatsEntry('cache_hits');
// Remove old refs
- //* DEBUG: */ print('+'.$cnt.'/'.$old."+<br />");
+ //* DEBUG: */ debugOutput('+'.$cnt.'/'.$old.'+');
$cnt -= $old;
} // END - if
} else {
}
// Return count
- //* DEBUG: */ print("*".$userid.'/'.$old.'/'.$cnt."*<br />");
+ //* DEBUG: */ debugOutput('*'.$userid.'/'.$old.'/'.$cnt.'*');
return $cnt;
}