Vergleich inc/class_session.php - 1.8.1 - 1.8.5

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 32Zeile 32
		$this->useragent = $_SERVER['HTTP_USER_AGENT'];

// Attempt to find a session id in the cookies.

		$this->useragent = $_SERVER['HTTP_USER_AGENT'];

// Attempt to find a session id in the cookies.

		if(isset($mybb->cookies['sid']))

		if(isset($mybb->cookies['sid']) && !defined('IN_UPGRADE'))

		{
$sid = $db->escape_string($mybb->cookies['sid']);
// Load the session

		{
$sid = $db->escape_string($mybb->cookies['sid']);
// Load the session

Zeile 159Zeile 159
		$mybb->user['pms_total'] = $mybb->user['totalpms'];
$mybb->user['pms_unread'] = $mybb->user['unreadpms'];


		$mybb->user['pms_total'] = $mybb->user['totalpms'];
$mybb->user['pms_unread'] = $mybb->user['unreadpms'];


		if($mybb->user['lastip'] != $this->packedip && array_key_exists('lastip', $mybb->user))

		if($mybb->user['lastip'] != $this->packedip && array_key_exists('lastip', $mybb->user) && !defined('IN_UPGRADE'))

		{
$lastip_add = ", lastip=".$db->escape_binary($this->packedip);
}

		{
$lastip_add = ", lastip=".$db->escape_binary($this->packedip);
}

Zeile 279Zeile 279
		}

// Update or create the session.

		}

// Update or create the session.

		if(!defined("NO_ONLINE"))

		if(!defined("NO_ONLINE") && !defined('IN_UPGRADE'))

		{
if(!empty($this->sid))
{

		{
if(!empty($this->sid))
{

Zeile 349Zeile 349
		$mybb->usergroup = array_merge($mybb->usergroup, $mydisplaygroup);

// Update the online data.

		$mybb->usergroup = array_merge($mybb->usergroup, $mydisplaygroup);

// Update the online data.

		if(!defined("NO_ONLINE"))

		if(!defined("NO_ONLINE") && !defined('IN_UPGRADE'))

		{
if(!empty($this->sid))
{

		{
if(!empty($this->sid))
{

Zeile 417Zeile 417
		}

// Update the online data.

		}

// Update the online data.

		if(!defined("NO_ONLINE"))

		if(!defined("NO_ONLINE") && !defined('IN_UPGRADE'))

		{
$this->sid = "bot=".$spider_id;
$this->create_session();

		{
$this->sid = "bot=".$spider_id;
$this->create_session();

Zeile 446Zeile 446
			$onlinedata['uid'] = 0;
}
$onlinedata['time'] = TIME_NOW;

			$onlinedata['uid'] = 0;
}
$onlinedata['time'] = TIME_NOW;

		$onlinedata['location'] = $db->escape_string(get_current_location());
$useragent = $this->useragent;
if(my_strlen($useragent) > 100)
{
$useragent = my_substr($useragent, 0, 100);
}
$onlinedata['useragent'] = $db->escape_string($useragent);

		
$onlinedata['location'] = $db->escape_string(substr(get_current_location(), 0, 150));
$onlinedata['useragent'] = $db->escape_string(my_substr($this->useragent, 0, 100));





		$onlinedata['location1'] = (int)$speciallocs['1'];
$onlinedata['location2'] = (int)$speciallocs['2'];
$onlinedata['nopermission'] = 0;

		$onlinedata['location1'] = (int)$speciallocs['1'];
$onlinedata['location2'] = (int)$speciallocs['2'];
$onlinedata['nopermission'] = 0;

Zeile 470Zeile 467
	{
global $db;
$speciallocs = $this->get_special_locations();

	{
global $db;
$speciallocs = $this->get_special_locations();





		// If there is a proper uid, delete by uid.
if($uid > 0)
{
$db->delete_query("sessions", "uid='{$uid}'");
$onlinedata['uid'] = $uid;

		// If there is a proper uid, delete by uid.
if($uid > 0)
{
$db->delete_query("sessions", "uid='{$uid}'");
$onlinedata['uid'] = $uid;

		}

		}

		// Is a spider - delete all other spider references
else if($this->is_spider == true)
{

		// Is a spider - delete all other spider references
else if($this->is_spider == true)
{

Zeile 500Zeile 497
		}
$onlinedata['time'] = TIME_NOW;
$onlinedata['ip'] = $db->escape_binary($this->packedip);

		}
$onlinedata['time'] = TIME_NOW;
$onlinedata['ip'] = $db->escape_binary($this->packedip);

		$onlinedata['location'] = $db->escape_string(get_current_location());
$useragent = $this->useragent;
if(my_strlen($useragent) > 100)
{
$useragent = my_substr($useragent, 0, 100);
}
$onlinedata['useragent'] = $db->escape_string($useragent);

		
$onlinedata['location'] = $db->escape_string(substr(get_current_location(), 0, 150));
$onlinedata['useragent'] = $db->escape_string(my_substr($this->useragent, 0, 100));





		$onlinedata['location1'] = (int)$speciallocs['1'];
$onlinedata['location2'] = (int)$speciallocs['2'];
$onlinedata['nopermission'] = 0;

		$onlinedata['location1'] = (int)$speciallocs['1'];
$onlinedata['location2'] = (int)$speciallocs['2'];
$onlinedata['nopermission'] = 0;

Zeile 524Zeile 518
	{
global $mybb;
$array = array('1' => '', '2' => '');

	{
global $mybb;
$array = array('1' => '', '2' => '');

		if(preg_match("#forumdisplay.php#", $_SERVER['PHP_SELF']) && $mybb->get_input('fid', 1) > 0)

		if(preg_match("#forumdisplay.php#", $_SERVER['PHP_SELF']) && $mybb->get_input('fid', MyBB::INPUT_INT) > 0)

		{

		{

			$array[1] = $mybb->get_input('fid', 1);

			$array[1] = $mybb->get_input('fid', MyBB::INPUT_INT);

			$array[2] = '';
}
elseif(preg_match("#showthread.php#", $_SERVER['PHP_SELF']))
{
global $db;


			$array[2] = '';
}
elseif(preg_match("#showthread.php#", $_SERVER['PHP_SELF']))
{
global $db;


			if($mybb->get_input('tid', 1) > 0)

			if($mybb->get_input('tid', MyBB::INPUT_INT) > 0)

			{

			{

				$array[2] = $mybb->get_input('tid', 1);

				$array[2] = $mybb->get_input('tid', MyBB::INPUT_INT);

			}

// If there is no tid but a pid, trick the system into thinking there was a tid anyway.

			}

// If there is no tid but a pid, trick the system into thinking there was a tid anyway.

Zeile 544Zeile 538
				$options = array(
"limit" => 1
);

				$options = array(
"limit" => 1
);

				$query = $db->simple_select("posts", "tid", "pid=".$mybb->get_input('pid', 1), $options);

				$query = $db->simple_select("posts", "tid", "pid=".$mybb->get_input('pid', MyBB::INPUT_INT), $options);

				$post = $db->fetch_array($query);
$array[2] = $post['tid'];
}

				$post = $db->fetch_array($query);
$array[2] = $post['tid'];
}