Vergleich portal.php - 1.8.20 - 1.8.27

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 235Zeile 235
	$timesearch = TIME_NOW - $mybb->settings['wolcutoff'];
$guestcount = $membercount = $botcount = $anoncount = 0;
$doneusers = $onlinemembers = $onlinebots = array();

	$timesearch = TIME_NOW - $mybb->settings['wolcutoff'];
$guestcount = $membercount = $botcount = $anoncount = 0;
$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.invisible, u.usergroup, u.displaygroup
FROM ".TABLE_PREFIX."sessions s
LEFT JOIN ".TABLE_PREFIX."users u ON (s.uid=u.uid)
WHERE s.time>'$timesearch'



		SELECT
s.sid, s.ip, s.uid, s.time, s.location, u.username, u.invisible, u.usergroup, u.displaygroup
FROM
".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 > $timesearch

		ORDER BY {$order_by}, {$order_by2}
");

// Fetch spiders
$spiders = $cache->read('spiders');

		ORDER BY {$order_by}, {$order_by2}
");

// Fetch spiders
$spiders = $cache->read('spiders');





	while($user = $db->fetch_array($query))
{


	while($user = $db->fetch_array($query))
{


Zeile 259Zeile 265
				++$membercount;

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

				++$membercount;

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





				// If the user is logged in anonymously, update the count for that.
if($user['invisible'] == 1)
{

				// If the user is logged in anonymously, update the count for that.
if($user['invisible'] == 1)
{

Zeile 273Zeile 279
				else
{
$invisiblemark = '';

				else
{
$invisiblemark = '';

				}

				}


if(($user['invisible'] == 1 && ($mybb->usergroup['canviewwolinvis'] == 1 || $user['uid'] == $mybb->user['uid'])) || $user['invisible'] != 1)
{


if(($user['invisible'] == 1 && ($mybb->usergroup['canviewwolinvis'] == 1 || $user['uid'] == $mybb->user['uid'])) || $user['invisible'] != 1)
{

Zeile 283Zeile 289
				}
}
}

				}
}
}

		elseif(my_strpos($user['sid'], 'bot=') !== false && $spiders[$botkey])

		elseif(my_strpos($user['sid'], 'bot=') !== false && $spiders[$botkey] && $mybb->settings['woldisplayspiders'] == 1)

		{
// The user is a search bot.
if($mybb->settings['wolorder'] == 'username')

		{
// The user is a search bot.
if($mybb->settings['wolorder'] == 'username')

Zeile 293Zeile 299
			else
{
$key = $user['time'];

			else
{
$key = $user['time'];

			}


			}


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

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

		else
{
++$guestcount;
}
}


	}






	if($mybb->settings['wolorder'] == 'activity')

	if($mybb->settings['wolorder'] == 'activity')

	{

	{

		// activity ordering is DESC, username is ASC
krsort($onlinebots);

		// activity ordering is DESC, username is ASC
krsort($onlinebots);

	}
else
{

	}
else
{

		ksort($onlinebots);
}

$onlinemembers = array_merge($onlinebots, $onlinemembers);
if(!empty($onlinemembers))

		ksort($onlinebots);
}

$onlinemembers = array_merge($onlinebots, $onlinemembers);
if(!empty($onlinemembers))

	{

	{

		$comma = $lang->comma." ";
$onlinemembers = implode($comma, $onlinemembers);

		$comma = $lang->comma." ";
$onlinemembers = implode($comma, $onlinemembers);

	}

	}

	else
{
$onlinemembers = "";

	else
{
$onlinemembers = "";

	}

	}


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



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


Zeile 350Zeile 352
	}
$recordcount = $mostonline['numusers'];
$recorddate = my_date('relative', $mostonline['time']);

	}
$recordcount = $mostonline['numusers'];
$recorddate = my_date('relative', $mostonline['time']);





	if($onlinecount == 1)
{
$lang->online_users = $lang->online_user;

	if($onlinecount == 1)
{
$lang->online_users = $lang->online_user;

Zeile 392Zeile 394
		if(isset($forumpermissions[$thread['fid']]['canonlyviewownthreads']) && $forumpermissions[$thread['fid']]['canonlyviewownthreads'] == 1 && $thread['uid'] != $mybb->user['uid'])
{
continue;

		if(isset($forumpermissions[$thread['fid']]['canonlyviewownthreads']) && $forumpermissions[$thread['fid']]['canonlyviewownthreads'] == 1 && $thread['uid'] != $mybb->user['uid'])
{
continue;

		}

		}


$lastpostdate = my_date('relative', $thread['lastpost']);
if(!$thread['lastposteruid'] && !$thread['lastposter'])


$lastpostdate = my_date('relative', $thread['lastpost']);
if(!$thread['lastposteruid'] && !$thread['lastposter'])

Zeile 405Zeile 407
		}
$thread['replies'] = my_number_format($thread['replies']);
$thread['views'] = my_number_format($thread['views']);

		}
$thread['replies'] = my_number_format($thread['replies']);
$thread['views'] = my_number_format($thread['views']);





		// Don't link to guest's profiles (they have no profile).
if($thread['lastposteruid'] == 0)
{
$lastposterlink = $lastposter;
}
else

		// Don't link to guest's profiles (they have no profile).
if($thread['lastposteruid'] == 0)
{
$lastposterlink = $lastposter;
}
else

		{

		{

			$lastposterlink = build_profile_link($lastposter, $thread['lastposteruid']);
}


			$lastposterlink = build_profile_link($lastposter, $thread['lastposteruid']);
}


Zeile 460Zeile 462
			$announcementsfids = implode(',', $fid_array);

$annfidswhere = " AND t.fid IN ($announcementsfids)";

			$announcementsfids = implode(',', $fid_array);

$annfidswhere = " AND t.fid IN ($announcementsfids)";

		}

		}

	}

// And get them!

	}

// And get them!

Zeile 625Zeile 627
			{
eval("\$numcomments = \"".$templates->get("portal_announcement_numcomments_no")."\";");
$lastcomment = '';

			{
eval("\$numcomments = \"".$templates->get("portal_announcement_numcomments_no")."\";");
$lastcomment = '';

			}


			}


			$senditem = '';
if($mybb->user['uid'] > 0 && $mybb->usergroup['cansendemail'] == 1)
{
eval("\$senditem = \"".$templates->get("portal_announcement_send_item")."\";");

			$senditem = '';
if($mybb->user['uid'] > 0 && $mybb->usergroup['cansendemail'] == 1)
{
eval("\$senditem = \"".$templates->get("portal_announcement_send_item")."\";");

			}


			}


			$plugins->run_hooks("portal_announcement");

$parser_options = array(

			$plugins->run_hooks("portal_announcement");

$parser_options = array(

Zeile 646Zeile 648
			if($announcement['smilieoff'] == 1)
{
$parser_options['allow_smilies'] = 0;

			if($announcement['smilieoff'] == 1)
{
$parser_options['allow_smilies'] = 0;

			}

			}





			if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)

			if($mybb->user['uid'] != 0 && $mybb->user['showimages'] != 1 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)

			{
$parser_options['allow_imgcode'] = 0;
}


			{
$parser_options['allow_imgcode'] = 0;
}


			if($mybb->user['showvideos'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestvideos'] != 1 && $mybb->user['uid'] == 0)

			if($mybb->user['uid'] != 0 && $mybb->user['showvideos'] != 1 || $mybb->settings['guestvideos'] != 1 && $mybb->user['uid'] == 0)

			{
$parser_options['allow_videocode'] = 0;
}

			{
$parser_options['allow_videocode'] = 0;
}

Zeile 682Zeile 684
							$isimage = false;
}
$attachment['icon'] = get_attachment_icon($ext);

							$isimage = false;
}
$attachment['icon'] = get_attachment_icon($ext);

 
						if(!$attachment['dateuploaded'])
{
$attachment['dateuploaded'] = $announcement['dateline'];
}
$attachdate = my_date('normal', $attachment['dateuploaded']);

						// Support for [attachment=id] code
if(stripos($message, "[attachment=".$attachment['aid']."]") !== false)
{

						// Support for [attachment=id] code
if(stripos($message, "[attachment=".$attachment['aid']."]") !== false)
{