"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Upload/portal.php" between
mybb_1821.zip and mybb_1822.zip

About: MyBB is a multilingual, standards-compliant and free forum (discussion board) software.

portal.php  (mybb_1821):portal.php  (mybb_1822)
skipping to change at line 238 skipping to change at line 238
} }
else else
{ {
$order_by = 's.time DESC'; $order_by = 's.time DESC';
$order_by2 = 'u.username ASC'; $order_by2 = 'u.username ASC';
} }
$timesearch = TIME_NOW - $mybb->settings['wolcutoff']; $timesearch = TIME_NOW - $mybb->settings['wolcutoff'];
$guestcount = $membercount = $botcount = $anoncount = 0; $guestcount = $membercount = $botcount = $anoncount = 0;
$doneusers = $onlinemembers = $onlinebots = array(); $doneusers = $onlinemembers = $onlinebots = array();
$query = $db->simple_select("sessions", "COUNT(DISTINCT ip) AS guestcount
", "uid = 0 AND time > $timesearch");
$guestcount = $db->fetch_field($query, "guestcount");
$query = $db->query(" $query = $db->query("
SELECT s.sid, s.ip, s.uid, s.time, s.location, u.username, u.invi SELECT
sible, u.usergroup, u.displaygroup s.sid, s.ip, s.uid, s.time, s.location, u.username, u.inv
FROM ".TABLE_PREFIX."sessions s isible, u.usergroup, u.displaygroup
LEFT JOIN ".TABLE_PREFIX."users u ON (s.uid=u.uid) FROM
WHERE s.time>'$timesearch' ".TABLE_PREFIX."sessions s
LEFT JOIN ".TABLE_PREFIX."users u ON (s.uid=u.uid)
WHERE (s.uid != 0 OR SUBSTR(s.sid,4,1) = '=') AND s.time > $times
earch
ORDER BY {$order_by}, {$order_by2} ORDER BY {$order_by}, {$order_by2}
"); ");
// Fetch spiders // Fetch spiders
$spiders = $cache->read('spiders'); $spiders = $cache->read('spiders');
while($user = $db->fetch_array($query)) while($user = $db->fetch_array($query))
{ {
// Create a key to test if this user is a search bot. // Create a key to test if this user is a search bot.
skipping to change at line 301 skipping to change at line 307
$key = $spiders[$botkey]['name']; $key = $spiders[$botkey]['name'];
} }
else else
{ {
$key = $user['time']; $key = $user['time'];
} }
$onlinebots[$key] = format_name($spiders[$botkey]['name'] , $spiders[$botkey]['usergroup']); $onlinebots[$key] = format_name($spiders[$botkey]['name'] , $spiders[$botkey]['usergroup']);
++$botcount; ++$botcount;
} }
else
{
++$guestcount;
}
} }
if($mybb->settings['wolorder'] == 'activity') if($mybb->settings['wolorder'] == 'activity')
{ {
// activity ordering is DESC, username is ASC // activity ordering is DESC, username is ASC
krsort($onlinebots); krsort($onlinebots);
} }
else else
{ {
ksort($onlinebots); ksort($onlinebots);
 End of changes. 3 change blocks. 
9 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)