Topic: Redundant check in update_users_online

I just had the double online issue with PunBB. I checked out the update_users_online function and noticed this

    // Fetch all online list entries that are older than "o_timeout_online"
    $result = $db->query('SELECT * FROM '.$db->prefix.'online WHERE logged<'.($now-$pun_config['o_timeout_online'])) or error('Unable to delete from online list', __FILE__, __LINE__, $db->error());

and then there was this:

if ($cur_user['logged'] < ($now-$pun_config['o_timeout_visit']))

Isn't that true for everything that grabs?

Re: Redundant check in update_users_online

Have a closer look smile

"Programming is like sex: one mistake and you have to support it for the rest of your life."

3 (edited by Smartys 2005-09-16 00:22)

Re: Redundant check in update_users_online

Mmm, I see: I really shouldn't be checking this kind of thing when I'm running for a class tongue
However, here's a fun little easter egg: set online timout to -1 big_smile

And then there's this

$result = $db->query('SELECT * FROM '.$db->prefix.'online WHERE logged<'.($now-$pun_config['o_timeout_online'])) or error('Unable to delete from online list', __FILE__, __LINE__, $db->error());

Check out the error text tongue

Re: Redundant check in update_users_online

Whoops smile

"Programming is like sex: one mistake and you have to support it for the rest of your life."

5

Re: Redundant check in update_users_online

hahaha i love easter eggs smile

-gezz

Re: Redundant check in update_users_online

Smartys wrote:

I just had the double online issue with PunBB.

I've been having this issue. I've read this post and it's replies, but never saw how to fix it. How does one fix this bug?

Re: Redundant check in update_users_online

This thread doesn't have a fix, keep looking for it (I posted another thread with various fixes)