Vergleich global.php - 1.4.0 - 1.4.1

  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 4098 2008-08-10 03:18:01Z chris $

 */

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

 */

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

Zeile 24Zeile 24
	$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 164Zeile 170

// After all of that no theme? Load the board default
if(empty($loadstyle))


// After all of that no theme? Load the board default
if(empty($loadstyle))

{

{

	$loadstyle = "def='1'";
}


	$loadstyle = "def='1'";
}


Zeile 182Zeile 188
	}
// Missing theme was from a user, run a query to set any users using the theme to the default
else if($load_from_user == 1)

	}
// Missing theme was from a user, run a query to set any users using the theme to the default
else if($load_from_user == 1)

	{

	{

		$db->update_query("users", array("style" => 0), "style='{$style['style']}'");
}
// Attempt to load the master or any other theme if the master is not available

		$db->update_query("users", array("style" => 0), "style='{$style['style']}'");
}
// Attempt to load the master or any other theme if the master is not available

Zeile 210Zeile 216
		}

if($theme['stylesheets'][$stylesheet_script][$stylesheet_action])

		}

if($theme['stylesheets'][$stylesheet_script][$stylesheet_action])

		{

		{

			// Actually add the stylesheets to the list
foreach($theme['stylesheets'][$stylesheet_script][$stylesheet_action] as $page_stylesheet)
{

			// Actually add the stylesheets to the list
foreach($theme['stylesheets'][$stylesheet_script][$stylesheet_action] as $page_stylesheet)
{

Zeile 222Zeile 228
				$already_loaded[$page_stylesheet] = 1;
}
}

				$already_loaded[$page_stylesheet] = 1;
}
}

	}

	}

}

if(!@is_dir($theme['imgdir']))

}

if(!@is_dir($theme['imgdir']))

Zeile 234Zeile 240
if(!empty($mybb->user['language']) && is_dir($theme['imgdir'].'/'.$mybb->user['language']))
{
$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language'];

if(!empty($mybb->user['language']) && is_dir($theme['imgdir'].'/'.$mybb->user['language']))
{
$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language'];

}

}

else
{
// Check if a custom language directory exists for this theme

else
{
// Check if a custom language directory exists for this theme

Zeile 257Zeile 263

// Load Main Templates and Cached Templates
if(isset($templatelist))


// Load Main Templates and Cached Templates
if(isset($templatelist))

{

{

	$templatelist .= ',';
}
$templatelist .= "css,headerinclude,header,footer,gobutton,htmldoctype,header_welcomeblock_member,header_welcomeblock_guest,header_welcomeblock_member_admin,global_pm_alert,global_unreadreports";
$templatelist .= ",nav,nav_sep,nav_bit,nav_sep_active,nav_bit_active,footer_languageselect,header_welcomeblock_member_moderator,redirect,error";
$templates->cache($db->escape_string($templatelist));

	$templatelist .= ',';
}
$templatelist .= "css,headerinclude,header,footer,gobutton,htmldoctype,header_welcomeblock_member,header_welcomeblock_guest,header_welcomeblock_member_admin,global_pm_alert,global_unreadreports";
$templatelist .= ",nav,nav_sep,nav_bit,nav_sep_active,nav_bit_active,footer_languageselect,header_welcomeblock_member_moderator,redirect,error";
$templates->cache($db->escape_string($templatelist));





// Set the current date and time now
$datenow = my_date($mybb->settings['dateformat'], TIME_NOW, '', false);
$timenow = my_date($mybb->settings['timeformat'], TIME_NOW);

// Set the current date and time now
$datenow = my_date($mybb->settings['dateformat'], TIME_NOW, '', false);
$timenow = my_date($mybb->settings['timeformat'], TIME_NOW);

Zeile 279Zeile 285
else
{
$lastvisit = $lang->lastvisit_never;

else
{
$lastvisit = $lang->lastvisit_never;

}


}


// If the board is closed and we have an Administrator, show board closed warning
$bbclosedwarning = '';
if($mybb->settings['boardclosed'] == 1 && $mybb->usergroup['cancp'] == 1)

// If the board is closed and we have an Administrator, show board closed warning
$bbclosedwarning = '';
if($mybb->settings['boardclosed'] == 1 && $mybb->usergroup['cancp'] == 1)

Zeile 303Zeile 309
	if($mybb->usergroup['canmodcp'] == 1)
{
eval("\$modcplink = \"".$templates->get("header_welcomeblock_member_moderator")."\";");

	if($mybb->usergroup['canmodcp'] == 1)
{
eval("\$modcplink = \"".$templates->get("header_welcomeblock_member_moderator")."\";");

	}

	}

	
// Format the welcome back message
$lang->welcome_back = $lang->sprintf($lang->welcome_back, $mybb->user['username'], $lastvisit);

	
// Format the welcome back message
$lang->welcome_back = $lang->sprintf($lang->welcome_back, $mybb->user['username'], $lastvisit);

Zeile 313Zeile 319
	eval("\$welcomeblock = \"".$templates->get("header_welcomeblock_member")."\";");
}
// Otherwise, we have a guest

	eval("\$welcomeblock = \"".$templates->get("header_welcomeblock_member")."\";");
}
// Otherwise, we have a guest

else
{

else
{

	eval("\$welcomeblock = \"".$templates->get("header_welcomeblock_guest")."\";");
}


	eval("\$welcomeblock = \"".$templates->get("header_welcomeblock_guest")."\";");
}


Zeile 331Zeile 337
		if($reported['unread'] == 1)
{
$lang->unread_reports = $lang->unread_report;

		if($reported['unread'] == 1)
{
$lang->unread_reports = $lang->unread_report;

		}

		}

		else
{
$lang->unread_reports = $lang->sprintf($lang->unread_reports, $reported['unread']);

		else
{
$lang->unread_reports = $lang->sprintf($lang->unread_reports, $reported['unread']);

Zeile 349Zeile 355
else
{
$charset = "UTF-8";

else
{
$charset = "UTF-8";

}


}


// Is this user apart of a banned group?
$bannedwarning = '';
if($mybb->usergroup['isbannedgroup'] == 1)

// Is this user apart of a banned group?
$bannedwarning = '';
if($mybb->usergroup['isbannedgroup'] == 1)

Zeile 362Zeile 368
	{
// Format their ban lift date and reason appropriately
if($ban['lifted'] > 0)

	{
// Format their ban lift date and reason appropriately
if($ban['lifted'] > 0)

		{

		{

			$banlift = my_date($mybb->settings['dateformat'], $ban['lifted']) . ", " . my_date($mybb->settings['timeformat'], $ban['lifted']);
}
else

			$banlift = my_date($mybb->settings['dateformat'], $ban['lifted']) . ", " . my_date($mybb->settings['timeformat'], $ban['lifted']);
}
else

Zeile 397Zeile 403
		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)
{
$privatemessage_text = $lang->sprintf($lang->newpm_notice_one, get_profile_link($pm['fromuid']), $pm['fromusername'], $pm['pmid'], $pm['subject']);

	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']);