Vergleich inc/init.php - 1.8.0 - 1.8.27

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 12Zeile 12
if(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");

if(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");

 
}

// Fallback
if(!defined('THIS_SCRIPT'))
{
define('THIS_SCRIPT', 'unknown');

}

/* Defines the root directory for MyBB.

}

/* Defines the root directory for MyBB.

Zeile 20Zeile 26
	if you experience problems.

Always add a trailing slash to the end of the path.

	if you experience problems.

Always add a trailing slash to the end of the path.





	* Path to your copy of MyBB
*/
//define('MYBB_ROOT', "./");

	* Path to your copy of MyBB
*/
//define('MYBB_ROOT', "./");





// Attempt autodetection
if(!defined('MYBB_ROOT'))

// Attempt autodetection
if(!defined('MYBB_ROOT'))

{

{

	define('MYBB_ROOT', dirname(dirname(__FILE__))."/");

	define('MYBB_ROOT', dirname(dirname(__FILE__))."/");

}


}


define("TIME_NOW", time());

if(function_exists('date_default_timezone_set') && !ini_get('date.timezone'))

define("TIME_NOW", time());

if(function_exists('date_default_timezone_set') && !ini_get('date.timezone'))

Zeile 40Zeile 46

require_once MYBB_ROOT."inc/class_error.php";
$error_handler = new errorHandler();


require_once MYBB_ROOT."inc/class_error.php";
$error_handler = new errorHandler();







// Show errors triggered during initialization
$error_handler->force_display_errors = true;


if(!function_exists('json_encode') || !function_exists('json_decode'))
{
require_once MYBB_ROOT.'inc/3rdparty/json/json.php';

if(!function_exists('json_encode') || !function_exists('json_decode'))
{
require_once MYBB_ROOT.'inc/3rdparty/json/json.php';

Zeile 102Zeile 111
{
$mybb->trigger_generic_error("install_directory");
}

{
$mybb->trigger_generic_error("install_directory");
}

 

// Load DB interface
require_once MYBB_ROOT."inc/db_base.php";
require_once MYBB_ROOT . 'inc/AbstractPdoDbDriver.php';


require_once MYBB_ROOT."inc/db_".$config['database']['type'].".php";



require_once MYBB_ROOT."inc/db_".$config['database']['type'].".php";


Zeile 112Zeile 125
		break;
case "pgsql":
$db = new DB_PgSQL;

		break;
case "pgsql":
$db = new DB_PgSQL;

 
		break;
case "pgsql_pdo":
$db = new PostgresPdoDbDriver();

		break;
case "mysqli":
$db = new DB_MySQLi;

		break;
case "mysqli":
$db = new DB_MySQLi;

 
		break;
case "mysql_pdo":
$db = new MysqlPdoDbDriver();

		break;
default:
$db = new DB_MySQL;

		break;
default:
$db = new DB_MySQL;

Zeile 201Zeile 220
{
$cache->update("internal_settings", array('encryption_key' => random_str(32)));
$settings['internal'] = $cache->read("internal_settings");

{
$cache->update("internal_settings", array('encryption_key' => random_str(32)));
$settings['internal'] = $cache->read("internal_settings");

}


}


$mybb->settings = &$settings;
$mybb->parse_cookies();
$mybb->cache = &$cache;
$mybb->asset_url = $mybb->get_asset_url();

if($mybb->use_shutdown == true)

$mybb->settings = &$settings;
$mybb->parse_cookies();
$mybb->cache = &$cache;
$mybb->asset_url = $mybb->get_asset_url();

if($mybb->use_shutdown == true)

{

{

	register_shutdown_function('run_shutdown');
}

// Did we just upgrade to a new version and haven't run the upgrade scripts yet?
$version = $cache->read("version");
if(!defined("IN_INSTALL") && !defined("IN_UPGRADE") && $version['version_code'] < $mybb->version_code)

	register_shutdown_function('run_shutdown');
}

// Did we just upgrade to a new version and haven't run the upgrade scripts yet?
$version = $cache->read("version");
if(!defined("IN_INSTALL") && !defined("IN_UPGRADE") && $version['version_code'] < $mybb->version_code)

{

{

	$version_history = $cache->read("version_history");
if(empty($version_history) || file_exists(MYBB_ROOT."install/resources/upgrade".(int)(end($version_history)+1).".php"))
{
$mybb->trigger_generic_error("board_not_upgraded");
}
}

	$version_history = $cache->read("version_history");
if(empty($version_history) || file_exists(MYBB_ROOT."install/resources/upgrade".(int)(end($version_history)+1).".php"))
{
$mybb->trigger_generic_error("board_not_upgraded");
}
}

 

$error_handler->force_display_errors = false;


// Load plugins
if(!defined("NO_PLUGINS") && !($mybb->settings['no_plugins'] == 1))
{
$plugins->load();
}


// Load plugins
if(!defined("NO_PLUGINS") && !($mybb->settings['no_plugins'] == 1))
{
$plugins->load();
}


// Set up any shutdown functions we need to run globally
add_shutdown('send_mail_queue');

 

/* URL Definitions */
if($mybb->settings['seourls'] == "yes" || ($mybb->settings['seourls'] == "auto" && isset($_SERVER['SEO_SUPPORT']) && $_SERVER['SEO_SUPPORT'] == 1))


/* URL Definitions */
if($mybb->settings['seourls'] == "yes" || ($mybb->settings['seourls'] == "auto" && isset($_SERVER['SEO_SUPPORT']) && $_SERVER['SEO_SUPPORT'] == 1))

Zeile 287Zeile 305
	11 => "jS F, Y",
12 => "l, jS F, Y",
// ISO 8601

	11 => "jS F, Y",
12 => "l, jS F, Y",
// ISO 8601

	13 => "Y-d-m"

	13 => "Y-m-d"

);

// An array of valid time formats (Used for user selections etc)

);

// An array of valid time formats (Used for user selections etc)