online users listing issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AbdelrahmanSalem
    New Member
    • Jun 2011
    • 10
    • 4.1.x

    [Forum] online users listing issue

    hi ,

    i'm wondering why vbulletin didn't added the condition for fetching who's viewing the thread/forum right now by adding the condition (inthread/inforum) instead of fetching all the logged in users and do a php process ?

    old code in showthread.php for instance :
    PHP Code:
    // Don't put the inthread value in the WHERE clause as it might not be the newest location!
    $threadusers $db->query_read_slave("        SELECT user.username, user.usergroupid, user.membergroupids,            session.userid, session.inthread, session.lastactivity, session.badlocation,            IF(user.displaygroupid = 0, user.usergroupid, user.displaygroupid) AS displaygroupid, infractiongroupid,            IF(user.options & " $vbulletin->bf_misc_useroptions['invisible'] . ", 1, 0) AS invisible        FROM " TABLE_PREFIX "session AS session        LEFT JOIN " TABLE_PREFIX "user AS user ON(user.userid = session.userid)        WHERE session.lastactivity > $datecut        ORDER BY " iif($vbulletin->options['showthreadusers'] == OR $vbulletin->options['showthreadusers'] == 3" username ASC,") . " lastactivity DESC 
    as it should be as i guess like this :
    PHP Code:
    SELECT user.usernameuser.usergroupiduser.membergroupids,            session.useridsession.inthreadsession.lastactivitysession.badlocation,            IF(user.displaygroupid 0user.usergroupiduser.displaygroupid) AS displaygroupidinfractiongroupid,            IF(user.options " . $vbulletin->bf_misc_useroptions['invisible'] . "10) AS invisible        FROM " . TABLE_PREFIX . "session AS session        LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid session.userid)        WHERE session.lastactivity $datecut and inforum ".$threadinfo['threadid']."        ORDER BY " . iif($vbulletin->options['showthreadusers'] == 1 OR $vbulletin->options['showthreadusers'] == 3, " username ASC,") . " lastactivity DESC 

    from the comments i see "Don't put the inthread value in the WHERE clause as it might not be the newest location!" but in the bootstrapper i think the value will be changed according for the current location .


    i think i will boost the pages .
    Software Engineer .
    Just remember : what happens in Localhost stays @localhost
  • Zachery
    Former vBulletin Support
    • Jul 2002
    • 59097

    #2
    If you think it is a bug, please report it in our bug tracker.

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...