}
// Load all userid
- while (list($uid, $notified) = SQL_FETCHROW($result)) {
+ while ($content = SQL_FETCHARRAY($result)) {
// Get total points
- $points = GET_TOTAL_DATA($uid, "user_points", "points") - GET_TOTAL_DATA($uid, "user_data", "used_points");
- //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "uid={$uid},points={$points}", false);
+ $points = GET_TOTAL_DATA($content['userid'], "user_points", "points") - GET_TOTAL_DATA($content['userid'], "user_data", "used_points");
+ //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "uid={$content['userid']},points={$points}", false);
// Shall we add this to ignore?
if ($points <= $limit) {
// Ignore this one!
- //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "uid={$uid} has depleted points amount!", false);
- $UIDs['uid'][$uid] = $uid;
- $UIDs['points'][$uid] = $points;
- $UIDs['notified'][$uid] = $notified;
+ //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "uid={$content['userid']} has depleted points amount!", false);
+ $UIDs['uid'][$content['userid']] = $content['userid'];
+ $UIDs['points'][$content['userid']] = $points;
+ $UIDs['notified'][$content['userid']] = $content['notified'];
} // END - if
} // END - while
__FUNCTION__, __LINE__);
// Load all entries
- while (list($lid, $url, $last) = SQL_FETCHROW($result)) {
+ while ($content = SQL_FETCHARRAY($result)) {
// Debug message
- //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "next - lid={$lid},url={$url},rest=".(time() - $last)."/".SURFBAR_GET_SURF_LOCK()."", false);
+ //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "next - lid={$content['id']},url={$content['url_id']},rest=".(time() - $last)."/".SURFBAR_GET_SURF_LOCK()."", false);
// Skip entries that are too old
- if (($last > (time() - SURFBAR_GET_SURF_LOCK())) && (!in_array($url, $ignored))) {
+ if (($last > (time() - SURFBAR_GET_SURF_LOCK())) && (!in_array($content['url_id'], $ignored))) {
// Debug message
- //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "okay - lid={$lid},url={$url},last={$last}", false);
+ //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "okay - lid={$content['id']},url={$content['url_id']},last={$last}", false);
// Add only if missing or bigger
- if ((!isset($IDs[$url])) || ($IDs[$url] > $last)) {
+ if ((!isset($IDs[$content['url_id']])) || ($IDs[$content['url_id']] > $last)) {
// Debug message
- //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "ADD - lid={$lid},url={$url},last={$last}", false);
+ //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "ADD - lid={$content['id']},url={$content['url_id']},last={$last}", false);
// Add this ID
- $IDs[$url] = $last;
- $USE[$url] = $lid;
+ $IDs[$content['url_id']] = $last;
+ $USE[$content['url_id']] = $content['id'];
} // END - if
} else {
// Debug message
- //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "ignore - lid={$lid},url={$url},last={$last}", false);
+ //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "ignore - lid={$content['id']},url={$content['url_id']},last={$last}", false);
// Ignore these old entries!
- $ignored[] = $url;
- unset($IDs[$url]);
- unset($USE[$url]);
+ $ignored[] = $content['url_id'];
+ unset($IDs[$content['url_id']]);
+ unset($USE[$content['url_id']]);
}
} // END - while
// Some entries there?
if (SQL_NUMROWS($result) > 0) {
// Load all actions
- while (list($action) = SQL_FETCHROW($result)) {
- $returnArray[] = $action;
+ // @TODO This can be somehow rewritten
+ while ($content = SQL_FETCHARRAY($result)) {
+ $returnArray[] = $content['action'];
} // END - if
} // END - if