Vergleich global.php - 1.4.0 - 1.4.8

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: global.php 4001 2008-07-08 22:34:00Z Tikitiki $

 * $Id: global.php 4369 2009-05-11 08:48:32Z Tomm $

 */

 */

 
 
$working_dir = dirname(__FILE__);
if(!$working_dir)
{
$working_dir = '.';
}


// Load main MyBB core file which begins all of the magic


// Load main MyBB core file which begins all of the magic

require_once "./inc/init.php";

require_once $working_dir."/inc/init.php";


$shutdown_queries = array();



$shutdown_queries = array();


Zeile 24Zeile 30
	$groupscache = $cache->read("usergroups");
}


	$groupscache = $cache->read("usergroups");
}


$current_page = my_strtolower(basename($_SERVER['PHP_SELF']));







if(!defined('THIS_SCRIPT'))
{
define('THIS_SCRIPT', '');
}

$current_page = my_strtolower(basename(THIS_SCRIPT));



// Send page headers - don't send no-cache headers for attachment.php
if($current_page != "attachment.php")


// Send page headers - don't send no-cache headers for attachment.php
if($current_page != "attachment.php")

Zeile 45Zeile 57
$mybb->session = &$session;

$mybb->user['ismoderator'] = is_moderator("", "", $mybb->user['uid']);

$mybb->session = &$session;

$mybb->user['ismoderator'] = is_moderator("", "", $mybb->user['uid']);





// Set our POST validation code here
$mybb->post_code = generate_post_check();


// Set our POST validation code here
$mybb->post_code = generate_post_check();


Zeile 57Zeile 69
	if($mybb->user['uid'])
{
$db->update_query("users", array("language" => $db->escape_string($mybb->settings['bblanguage'])), "uid='{$mybb->user['uid']}'");

	if($mybb->user['uid'])
{
$db->update_query("users", array("language" => $db->escape_string($mybb->settings['bblanguage'])), "uid='{$mybb->user['uid']}'");

	}

	}

	// Guest = cookie
else
{

	// Guest = cookie
else
{

Zeile 114Zeile 126
if(in_array($current_page, $valid))
{
// If we're accessing a post, fetch the forum theme for it and if we're overriding it

if(in_array($current_page, $valid))
{
// If we're accessing a post, fetch the forum theme for it and if we're overriding it

	if(isset($mybb->input['pid']))

	if($mybb->input['pid'])

	{
$query = $db->query("
SELECT f.style, f.overridestyle, p.*

	{
$query = $db->query("
SELECT f.style, f.overridestyle, p.*

Zeile 129Zeile 141
	}

// We have a thread id and a forum id, we can easily fetch the theme for this forum

	}

// We have a thread id and a forum id, we can easily fetch the theme for this forum

	else if(isset($mybb->input['tid']))

	else if($mybb->input['tid'])

	{
$query = $db->query("
SELECT f.style, f.overridestyle, t.*

	{
$query = $db->query("
SELECT f.style, f.overridestyle, t.*

Zeile 143Zeile 155
	}

// We have a forum id - simply load the theme from it

	}

// We have a forum id - simply load the theme from it

	else if(isset($mybb->input['fid']))

	else if($mybb->input['fid'])

	{
cache_forums();
$style = $forum_cache[intval($mybb->input['fid'])];

	{
cache_forums();
$style = $forum_cache[intval($mybb->input['fid'])];

Zeile 397Zeile 409
		LIMIT 1
");
$pm = $db->fetch_array($query);

		LIMIT 1
");
$pm = $db->fetch_array($query);

 
	
if($pm['fromuid'] == 0)
{
$pm['fromusername'] = 'MyBB Engine';
$user_text = $pm['fromusername'];
}
else
{
$user_text = build_profile_link($pm['fromusername'], $pm['fromuid']);
}


	if($mybb->user['pms_unread'] == 1)
{

	if($mybb->user['pms_unread'] == 1)
{

		$privatemessage_text = $lang->sprintf($lang->newpm_notice_one, get_profile_link($pm['fromuid']), $pm['fromusername'], $pm['pmid'], $pm['subject']);

		$privatemessage_text = $lang->sprintf($lang->newpm_notice_one, $user_text, $pm['pmid'], htmlspecialchars_uni($pm['subject']));

	}
else
{

	}
else
{

		$privatemessage_text = $lang->sprintf($lang->newpm_notice_multiple, $mybb->user['pms_unread'], get_profile_link($pm['fromuid']), $pm['fromusername'], $pm['pmid'], $pm['subject']);

		$privatemessage_text = $lang->sprintf($lang->newpm_notice_multiple, $mybb->user['pms_unread'], $user_text, $pm['pmid'], htmlspecialchars_uni($pm['subject']));

	}
eval("\$pm_notice = \"".$templates->get("global_pm_alert")."\";");
}

	}
eval("\$pm_notice = \"".$templates->get("global_pm_alert")."\";");
}

Zeile 487Zeile 510
// Check banned ip addresses
if(is_banned_ip($session->ipaddress, true))
{

// Check banned ip addresses
if(is_banned_ip($session->ipaddress, true))
{

	$db->delete_query("sessions", "ip='".$db->escape_string($session->ipaddress)."' OR uid='{$mybb->user['uid']}'");








	if ($mybb->user['uid'])
{
$db->delete_query("sessions", "ip='".$db->escape_string($session->ipaddress)."' OR uid='{$mybb->user['uid']}'");
}
else
{
$db->delete_query("sessions", "ip='".$db->escape_string($session->ipaddress)."'");
}

	error($lang->error_banned);
}


	error($lang->error_banned);
}