"Fossies" - the Fresh Open Source Software Archive  

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

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

index.php  (mybb_1822):index.php  (mybb_1823)
skipping to change at line 23 skipping to change at line 23
$templatelist = "index,index_whosonline,index_whosonline_memberbit,forumbit_dept h1_cat,forumbit_depth2_cat,forumbit_depth2_forum,forumbit_depth1_forum_lastpost, forumbit_depth2_forum_lastpost,forumbit_moderators"; $templatelist = "index,index_whosonline,index_whosonline_memberbit,forumbit_dept h1_cat,forumbit_depth2_cat,forumbit_depth2_forum,forumbit_depth1_forum_lastpost, forumbit_depth2_forum_lastpost,forumbit_moderators";
$templatelist .= ",index_birthdays_birthday,index_birthdays,index_logoutlink,ind ex_statspage,index_stats,forumbit_depth3,forumbit_depth3_statusicon,index_boards tats,forumbit_depth2_forum_lastpost_never,forumbit_depth2_forum_viewers"; $templatelist .= ",index_birthdays_birthday,index_birthdays,index_logoutlink,ind ex_statspage,index_stats,forumbit_depth3,forumbit_depth3_statusicon,index_boards tats,forumbit_depth2_forum_lastpost_never,forumbit_depth2_forum_viewers";
$templatelist .= ",forumbit_moderators_group,forumbit_moderators_user,forumbit_d epth2_forum_lastpost_hidden,forumbit_subforums,forumbit_depth2_forum_unapproved_ posts,forumbit_depth2_forum_unapproved_threads"; $templatelist .= ",forumbit_moderators_group,forumbit_moderators_user,forumbit_d epth2_forum_lastpost_hidden,forumbit_subforums,forumbit_depth2_forum_unapproved_ posts,forumbit_depth2_forum_unapproved_threads";
require_once './global.php'; require_once './global.php';
require_once MYBB_ROOT.'inc/functions_forumlist.php'; require_once MYBB_ROOT.'inc/functions_forumlist.php';
require_once MYBB_ROOT.'inc/class_parser.php'; require_once MYBB_ROOT.'inc/class_parser.php';
$parser = new postParser; $parser = new postParser;
$plugins->run_hooks('index_start');
// Load global language phrases // Load global language phrases
$lang->load('index'); $lang->load('index');
$plugins->run_hooks('index_start');
$logoutlink = ''; $logoutlink = '';
if($mybb->user['uid'] != 0) if($mybb->user['uid'] != 0)
{ {
eval('$logoutlink = "'.$templates->get('index_logoutlink').'";'); eval('$logoutlink = "'.$templates->get('index_logoutlink').'";');
} }
$statspage = ''; $statspage = '';
if($mybb->settings['statsenabled'] != 0) if($mybb->settings['statsenabled'] != 0)
{ {
if(!empty($logoutlink)) if(!empty($logoutlink))
skipping to change at line 71 skipping to change at line 71
$membercount = $guestcount = $anoncount = $botcount = 0; $membercount = $guestcount = $anoncount = $botcount = 0;
$forum_viewers = $doneusers = $onlinemembers = $onlinebots = array(); $forum_viewers = $doneusers = $onlinemembers = $onlinebots = array();
if($mybb->settings['showforumviewing'] != 0) if($mybb->settings['showforumviewing'] != 0)
{ {
$query = $db->query(" $query = $db->query("
SELECT SELECT
location1, COUNT(DISTINCT ip) AS guestcount location1, COUNT(DISTINCT ip) AS guestcount
FROM FROM
".TABLE_PREFIX."sessions ".TABLE_PREFIX."sessions
WHERE uid = 0 AND time > $timesearch WHERE uid = 0 AND location1 != 0 AND SUBSTR(sid,4,1) != ' =' AND time > $timesearch
GROUP BY location1 GROUP BY location1
"); ");
while($location = $db->fetch_array($query)) while($location = $db->fetch_array($query))
{ {
$guestcount += $location['guestcount']; $forum_viewers[$location['location1']] += $location['gues
tcount'];
if($location['location1'])
{
$forum_viewers[$location['location1']] += $locati
on['guestcount'];
}
} }
} }
else
{ $query = $db->simple_select("sessions", "COUNT(DISTINCT ip) AS guestcount
$query = $db->simple_select("sessions", "COUNT(DISTINCT ip) AS gu ", "uid = 0 AND SUBSTR(sid,4,1) != '=' AND time > $timesearch");
estcount", "uid = 0 AND time > $timesearch"); $guestcount = $db->fetch_field($query, "guestcount");
$guestcount = $db->fetch_field($query, "guestcount");
}
$query = $db->query(" $query = $db->query("
SELECT SELECT
s.sid, s.ip, s.uid, s.time, s.location, s.location1, u.us ername, u.invisible, u.usergroup, u.displaygroup s.sid, s.ip, s.uid, s.time, s.location, s.location1, u.us ername, u.invisible, u.usergroup, u.displaygroup
FROM FROM
".TABLE_PREFIX."sessions s ".TABLE_PREFIX."sessions s
LEFT JOIN ".TABLE_PREFIX."users u ON (s.uid=u.uid) 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 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');
// Loop through all users. // Loop through all users and 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.
$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.
if($user['uid'] > 0) if($user['uid'] > 0)
{ {
// The user is registered. // The user is registered.
if(empty($doneusers[$user['uid']]) || $doneusers[$user['u id']] < $user['time']) if(empty($doneusers[$user['uid']]) || $doneusers[$user['u id']] < $user['time'])
 End of changes. 6 change blocks. 
17 lines changed or deleted 10 lines changed or added

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