Vergleich inc/class_session.php - 1.6.12 - 1.6.18

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 35Zeile 35
		{
$sid = $db->escape_string($mybb->cookies['sid']);
// Load the session

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

			$query = $db->simple_select("sessions", "*", "sid='{$sid}' AND ip='".$db->escape_string($this->ipaddress)."'", array('limit' => 1));

			$query = $db->simple_select("sessions", "*", "sid='{$sid}' AND ip='".$db->escape_string($this->ipaddress)."'");

			$session = $db->fetch_array($query);
if($session['sid'])
{

			$session = $db->fetch_array($query);
if($session['sid'])
{

Zeile 233Zeile 233
		if(!empty($mybb->user['bandate']) && (isset($mybb->user['banlifted']) && !empty($mybb->user['banlifted'])) && $mybb->user['banlifted'] < $time)  // hmmm...bad user... how did you get banned =/
{
// must have been good.. bans up :D

		if(!empty($mybb->user['bandate']) && (isset($mybb->user['banlifted']) && !empty($mybb->user['banlifted'])) && $mybb->user['banlifted'] < $time)  // hmmm...bad user... how did you get banned =/
{
// must have been good.. bans up :D

			$db->shutdown_query("UPDATE ".TABLE_PREFIX."users SET usergroup='".intval($mybb->user['banoldgroup'])."', additionalgroups='".$mybb->user['oldadditionalgroups']."', displaygroup='".intval($mybb->user['olddisplaygroup'])."' WHERE uid='".$mybb->user['uid']."' LIMIT 1");

			$db->shutdown_query("UPDATE ".TABLE_PREFIX."users SET usergroup='".intval($mybb->user['banoldgroup'])."', additionalgroups='".$mybb->user['banoldadditionalgroups']."', displaygroup='".intval($mybb->user['banolddisplaygroup'])."' WHERE uid='".$mybb->user['uid']."'");

			$db->shutdown_query("DELETE FROM ".TABLE_PREFIX."banned WHERE uid='".$mybb->user['uid']."'");
// we better do this..otherwise they have dodgy permissions
$mybb->user['usergroup'] = $mybb->user['banoldgroup'];

			$db->shutdown_query("DELETE FROM ".TABLE_PREFIX."banned WHERE uid='".$mybb->user['uid']."'");
// we better do this..otherwise they have dodgy permissions
$mybb->user['usergroup'] = $mybb->user['banoldgroup'];

Zeile 372Zeile 372
		global $mybb, $time, $db, $lang;

// Fetch the spider preferences from the database

		global $mybb, $time, $db, $lang;

// Fetch the spider preferences from the database

		$query = $db->simple_select("spiders", "*", "sid='{$spider_id}'", array('limit' => 1));

		$query = $db->simple_select("spiders", "*", "sid='{$spider_id}'");

		$spider = $db->fetch_array($query);

// Set up some defaults

		$spider = $db->fetch_array($query);

// Set up some defaults

Zeile 413Zeile 413
			$updated_spider = array(
"lastvisit" => TIME_NOW
);

			$updated_spider = array(
"lastvisit" => TIME_NOW
);

			$db->update_query("spiders", $updated_spider, "sid='{$spider_id}'", 1);

			$db->update_query("spiders", $updated_spider, "sid='{$spider_id}'");

		}

// Update the online data.

		}

// Update the online data.

Zeile 458Zeile 458
		$onlinedata['nopermission'] = 0;
$sid = $db->escape_string($sid);


		$onlinedata['nopermission'] = 0;
$sid = $db->escape_string($sid);


		$db->update_query("sessions", $onlinedata, "sid='{$sid}'", 1);

		$db->update_query("sessions", $onlinedata, "sid='{$sid}'");

	}

/**

	}

/**

Zeile 533Zeile 533
		{
global $db;


		{
global $db;


			if($mybb->input['tid'] && intval($mybb->input['tid']) > 0)

			if(isset($mybb->input['tid']) && intval($mybb->input['tid']) > 0)

			{
$array[2] = intval($mybb->input['tid']);
}

			{
$array[2] = intval($mybb->input['tid']);
}

			elseif($mybb->input['pid'] && intval($mybb->input['pid']) > 0)
{
$array[2] = intval($mybb->input['pid']);
}


 
			// 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.

			if(!empty($mybb->input['pid']) && !isset($mybb->input['tid']))

			elseif(isset($mybb->input['pid']) && !empty($mybb->input['pid']))

			{
$options = array(
"limit" => 1
);
$query = $db->simple_select("posts", "tid", "pid=".$mybb->input['pid'], $options);
$post = $db->fetch_array($query);

			{
$options = array(
"limit" => 1
);
$query = $db->simple_select("posts", "tid", "pid=".$mybb->input['pid'], $options);
$post = $db->fetch_array($query);

				$mybb->input['tid'] = $post['tid'];

				$array[2] = $post['tid'];

			}


			}


			$thread = get_thread(intval($mybb->input['tid']));

			$thread = get_thread($array[2]);

			$array[1] = $thread['fid'];
}
return $array;

			$array[1] = $thread['fid'];
}
return $array;