"Fossies" - the Fresh Open Source Software Archive  

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

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

index.php  (mybb_1821):index.php  (mybb_1822)
skipping to change at line 60 skipping to change at line 60
$order_by = 'u.username ASC'; $order_by = 'u.username ASC';
$order_by2 = 's.time DESC'; $order_by2 = 's.time DESC';
} }
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 - (int)$mybb->settings['wolcutoff']; $timesearch = TIME_NOW - (int)$mybb->settings['wolcutoff'];
$membercount = $guestcount = $anoncount = $botcount = 0;
$forum_viewers = $doneusers = $onlinemembers = $onlinebots = array();
if($mybb->settings['showforumviewing'] != 0)
{
$query = $db->query("
SELECT
location1, COUNT(DISTINCT ip) AS guestcount
FROM
".TABLE_PREFIX."sessions
WHERE uid = 0 AND time > $timesearch
GROUP BY location1
");
while($location = $db->fetch_array($query))
{
$guestcount += $location['guestcount'];
if($location['location1'])
{
$forum_viewers[$location['location1']] += $locati
on['guestcount'];
}
}
}
else
{
$query = $db->simple_select("sessions", "COUNT(DISTINCT ip) AS gu
estcount", "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, s.location1, u.use SELECT
rname, u.invisible, u.usergroup, u.displaygroup s.sid, s.ip, s.uid, s.time, s.location, s.location1, u.us
FROM ".TABLE_PREFIX."sessions s ername, u.invisible, 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}
"); ");
$forum_viewers = $doneusers = $onlinemembers = $onlinebots = array();
$membercount = $guestcount = $anoncount = $botcount = 0;
// Fetch spiders // Fetch spiders
$spiders = $cache->read('spiders'); $spiders = $cache->read('spiders');
// Loop through all users. // Loop through all users.
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.
$botkey = my_strtolower(str_replace('bot=', '', $user['sid'])); $botkey = my_strtolower(str_replace('bot=', '', $user['sid']));
// Decide what type of user we are dealing with. // Decide what type of user we are dealing with.
skipping to change at line 128 skipping to change at line 158
} }
else else
{ {
$key = $user['time']; $key = $user['time'];
} }
// The user is a search bot. // The user is a search bot.
$onlinebots[$key] = format_name($spiders[$botkey]['name'] , $spiders[$botkey]['usergroup']); $onlinebots[$key] = format_name($spiders[$botkey]['name'] , $spiders[$botkey]['usergroup']);
++$botcount; ++$botcount;
} }
else
{
// The user is a guest.
++$guestcount;
}
if($user['location1']) if($user['location1'])
{ {
++$forum_viewers[$user['location1']]; ++$forum_viewers[$user['location1']];
} }
} }
if($mybb->settings['wolorder'] == 'activity') if($mybb->settings['wolorder'] == 'activity')
{ {
// activity ordering is DESC, username is ASC // activity ordering is DESC, username is ASC
 End of changes. 4 change blocks. 
13 lines changed or deleted 41 lines changed or added

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