Vergleich portal.php - 1.8.16 - 1.8.18

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 234Zeile 234

$timesearch = TIME_NOW - $mybb->settings['wolcutoff'];
$guestcount = $membercount = $botcount = $anoncount = 0;


$timesearch = TIME_NOW - $mybb->settings['wolcutoff'];
$guestcount = $membercount = $botcount = $anoncount = 0;

	$onlinemembers = $onlinebots = $comma = '';
$doneusers = array();

	$doneusers = $onlinemembers = $onlinebots = array();


	$query = $db->query("
SELECT s.sid, s.ip, s.uid, s.time, s.location, u.username, u.invisible, u.usergroup, u.displaygroup
FROM ".TABLE_PREFIX."sessions s

	$query = $db->query("
SELECT s.sid, s.ip, s.uid, s.time, s.location, u.username, u.invisible, u.usergroup, u.displaygroup
FROM ".TABLE_PREFIX."sessions s

Zeile 253Zeile 252
		// Create a key to test if this user is a search bot.
$botkey = my_strtolower(str_replace("bot=", '', $user['sid']));


		// Create a key to test if this user is a search bot.
$botkey = my_strtolower(str_replace("bot=", '', $user['sid']));


		if($user['uid'] == "0")
{
++$guestcount;
}
elseif(my_strpos($user['sid'], 'bot=') !== false && $spiders[$botkey])
{
// The user is a search bot.
$onlinebots .= $comma.format_name($spiders[$botkey]['name'], $spiders[$botkey]['usergroup']);
$comma = $lang->comma;
++$botcount;
}
else

		if($user['uid'] > 0)












		{
if(empty($doneusers[$user['uid']]) || $doneusers[$user['uid']] < $user['time'])

		{
if(empty($doneusers[$user['uid']]) || $doneusers[$user['uid']] < $user['time'])

			{

			{

				++$membercount;

				++$membercount;





				$doneusers[$user['uid']] = $user['time'];

// If the user is logged in anonymously, update the count for that.

				$doneusers[$user['uid']] = $user['time'];

// If the user is logged in anonymously, update the count for that.

				if($user['invisible'] == 1)

				if($user['invisible'] == 1)

				{
++$anoncount;
}

				{
++$anoncount;
}

Zeile 291Zeile 279
				{
$user['username'] = format_name(htmlspecialchars_uni($user['username']), $user['usergroup'], $user['displaygroup']);
$user['profilelink'] = get_profile_link($user['uid']);

				{
$user['username'] = format_name(htmlspecialchars_uni($user['username']), $user['usergroup'], $user['displaygroup']);
$user['profilelink'] = get_profile_link($user['uid']);

					eval("\$onlinemembers .= \"".$templates->get("portal_whosonline_memberbit", 1, 0)."\";");
$comma = $lang->comma;

					eval("\$onlinemembers[] = \"".$templates->get("portal_whosonline_memberbit", 1, 0)."\";");


				}
}

				}
}

 
		}
elseif(my_strpos($user['sid'], 'bot=') !== false && $spiders[$botkey])
{
// The user is a search bot.
if($mybb->settings['wolorder'] == 'username')
{
$key = $spiders[$botkey]['name'];
}
else
{
$key = $user['time'];
}

$onlinebots[$key] = format_name($spiders[$botkey]['name'], $spiders[$botkey]['usergroup']);
++$botcount;
}
else
{
++$guestcount;

		}
}

		}
}

 
if(trim($onlinebots) == "" || trim($onlinemembers) == "")
{
$comma = "";
}














if($mybb->settings['wolorder'] == 'activity')
{
// activity ordering is DESC, username is ASC
krsort($onlinebots);
}
else
{
ksort($onlinebots);
}

$onlinemembers = array_merge($onlinebots, $onlinemembers);
if(!empty($onlinemembers))
{
$comma = $lang->comma." ";
$onlinemembers = implode($comma, $onlinemembers);
}

	else
{

	else
{

		$comma = $lang->comma;

		$onlinemembers = "";

	}

	}


$onlinemembers = $onlinebots.$comma.$onlinemembers;

 

$onlinecount = $membercount + $guestcount + $botcount;



$onlinecount = $membercount + $guestcount + $botcount;