Vergleich archive/global.php - 1.8.1 - 1.8.37

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 20Zeile 20
require_once MYBB_ROOT."inc/class_session.php";
require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;

require_once MYBB_ROOT."inc/class_session.php";
require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;

 

$shutdown_queries = $shutdown_functions = array();


$groupscache = $cache->read("usergroups");
if(!is_array($groupscache))


$groupscache = $cache->read("usergroups");
if(!is_array($groupscache))

{

{

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

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

}

}

$fpermissioncache = $cache->read("forumpermissions");

// Send headers before anything else.

$fpermissioncache = $cache->read("forumpermissions");

// Send headers before anything else.

Zeile 43Zeile 45
//if((DIRECTORY_SEPARATOR != '\\' && stripos($_SERVER['SERVER_SOFTWARE'], 'apache') == false) || stripos(SAPI_NAME, 'cgi') !== false || defined("ARCHIVE_QUERY_STRINGS"))
// http://dev.mybb.com/issues/1489 - remove automatic detection and rely on users to set the right option here
if($mybb->settings['seourls_archive'] == 1)

//if((DIRECTORY_SEPARATOR != '\\' && stripos($_SERVER['SERVER_SOFTWARE'], 'apache') == false) || stripos(SAPI_NAME, 'cgi') !== false || defined("ARCHIVE_QUERY_STRINGS"))
// http://dev.mybb.com/issues/1489 - remove automatic detection and rely on users to set the right option here
if($mybb->settings['seourls_archive'] == 1)

{

{

	if($_SERVER['REQUEST_URI'])
{
$url = $_SERVER['REQUEST_URI'];

	if($_SERVER['REQUEST_URI'])
{
$url = $_SERVER['REQUEST_URI'];

Zeile 111Zeile 113
			WHERE a.aid='{$id}' AND startdate < '{$time}'  AND (enddate > '{$time}' OR enddate = 0)
");
$announcement = $db->fetch_array($query);

			WHERE a.aid='{$id}' AND startdate < '{$time}'  AND (enddate > '{$time}' OR enddate = 0)
");
$announcement = $db->fetch_array($query);

		if(!$announcement['aid'])
{
$action = "404";

		if(!$announcement)
{
$action = "404";

		}
}
elseif($action == "thread")
{
$query = $db->simple_select("threads", "*", "tid='{$id}' AND closed NOT LIKE 'moved|%'");
$thread = $db->fetch_array($query);

		}
}
elseif($action == "thread")
{
$query = $db->simple_select("threads", "*", "tid='{$id}' AND closed NOT LIKE 'moved|%'");
$thread = $db->fetch_array($query);

		if(!$thread['tid'])
{
$action = "404";
}

		if(!$thread)
{
$action = "404";
}

	}
elseif($action == "forum")

	}
elseif($action == "forum")

	{

	{

		$query = $db->simple_select("forums", "*", "fid='{$id}' AND active!=0 AND password=''");
$forum = $db->fetch_array($query);

		$query = $db->simple_select("forums", "*", "fid='{$id}' AND active!=0 AND password=''");
$forum = $db->fetch_array($query);

		if(!$forum['fid'])

		if(!$forum)

		{
$action = "404";
}

		{
$action = "404";
}

Zeile 137Zeile 139
	elseif($action != 'index')
{
$action = "404";

	elseif($action != 'index')
{
$action = "404";

	}
}

	}
}


// Define the full MyBB version location of this page.
if($action == "thread")
{
define('MYBB_LOCATION', get_thread_link($id));


// Define the full MyBB version location of this page.
if($action == "thread")
{
define('MYBB_LOCATION', get_thread_link($id));

}

}

elseif($action == "forum")
{
define('MYBB_LOCATION', get_forum_link($id));
}
elseif($action == "announcement")

elseif($action == "forum")
{
define('MYBB_LOCATION', get_forum_link($id));
}
elseif($action == "announcement")

{

{

	define('MYBB_LOCATION', get_announcement_link($id));
}
else

	define('MYBB_LOCATION', get_announcement_link($id));
}
else

Zeile 161Zeile 163
// Initialise session
$session = new session;
$session->init();

// Initialise session
$session = new session;
$session->init();





if(!$mybb->settings['bblanguage'])
{
$mybb->settings['bblanguage'] = "english";

if(!$mybb->settings['bblanguage'])
{
$mybb->settings['bblanguage'] = "english";

Zeile 188Zeile 190
{
if($mybb->usergroup['canviewboardclosed'] != 1)
{

{
if($mybb->usergroup['canviewboardclosed'] != 1)
{

 
		if(!$mybb->settings['boardclosed_reason'])
{
$mybb->settings['boardclosed_reason'] = $lang->boardclosed_reason;
}


		$lang->error_boardclosed .= "<blockquote>".$mybb->settings['boardclosed_reason']."</blockquote>";
archive_error($lang->error_boardclosed);

		$lang->error_boardclosed .= "<blockquote>".$mybb->settings['boardclosed_reason']."</blockquote>";
archive_error($lang->error_boardclosed);

	}
}

	}
}


// Do we require users to login?
if($mybb->settings['forcelogin'] == 1)


// Do we require users to login?
if($mybb->settings['forcelogin'] == 1)

Zeile 202Zeile 209
	}
}


	}
}


// Load Limiting - DIRECTORY_SEPARATOR checks if running windows
if(DIRECTORY_SEPARATOR != '\\')

// Load Limiting
if($mybb->usergroup['cancp'] != 1 && $mybb->settings['load'] > 0 && ($load = get_server_load()) && $load != $lang->unknown && $load > $mybb->settings['load'])

{

{

	if($uptime = @exec('uptime'))
{
preg_match("/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/", $uptime, $regs);
$load = $regs[1];
if($mybb->usergroup['cancp'] != 1 && $load > $mybb->settings['load'] && $mybb->settings['load'] > 0)
{
archive_error($lang->error_loadlimit);
}
}

	// User is not an administrator and the load limit is higher than the limit, show an error
archive_error($lang->error_loadlimit);








}

if($mybb->usergroup['canview'] == 0)

}

if($mybb->usergroup['canview'] == 0)