Vergleich global.php - 1.4.0 - 1.4.2

  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 4151 2008-08-26 04:39:31Z Tikitiki $

 */

 */

 
 
$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';
}


	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, get_profile_link($pm['fromuid']), htmlspecialchars_uni($pm['fromusername']), $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'], get_profile_link($pm['fromuid']), htmlspecialchars_uni($pm['fromusername']), $pm['pmid'], htmlspecialchars_uni($pm['subject']));

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

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