Vergleich inc/init.php - 1.8.14 - 1.8.30

  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 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'))
{


if(!function_exists('json_encode') || !function_exists('json_decode'))
{

Zeile 90Zeile 99
if(!is_array($config['database']))
{
$mybb->trigger_generic_error("board_not_upgraded");

if(!is_array($config['database']))
{
$mybb->trigger_generic_error("board_not_upgraded");

}

}


if(empty($config['admin_dir']))


if(empty($config['admin_dir']))

{

{

	$config['admin_dir'] = "admin";

	$config['admin_dir'] = "admin";

}











}

// Load Settings
$settings = array();

if(file_exists(MYBB_ROOT."inc/settings.php"))
{
require_once MYBB_ROOT."inc/settings.php";
$mybb->settings = $settings;
}


// Trigger an error if the installation directory exists
if(is_dir(MYBB_ROOT."install") && !file_exists(MYBB_ROOT."install/lock"))

// Trigger an error if the installation directory exists
if(is_dir(MYBB_ROOT."install") && !file_exists(MYBB_ROOT."install/lock"))

{

{

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

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





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

// 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";

switch($config['database']['type'])

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

switch($config['database']['type'])

Zeile 115Zeile 134
		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 157Zeile 182
$cache->cache();

// Load Settings

$cache->cache();

// Load Settings

if(file_exists(MYBB_ROOT."inc/settings.php"))
{
require_once MYBB_ROOT."inc/settings.php";
}

if(!file_exists(MYBB_ROOT."inc/settings.php") || empty($settings))
{
if(function_exists('rebuild_settings'))
{
rebuild_settings();
}
else
{
$options = array(
"order_by" => "title",
"order_dir" => "ASC"
);

$query = $db->simple_select("settings", "value, name", "", $options);

$settings = array();
while($setting = $db->fetch_array($query))
{
$setting['value'] = str_replace("\"", "\\\"", $setting['value']);
$settings[$setting['name']] = $setting['value'];
}
$db->free_result($query);
}

if(empty($settings))
{
rebuild_settings();


























}

$settings['wolcutoff'] = $settings['wolcutoffmins']*60;

}

$settings['wolcutoff'] = $settings['wolcutoffmins']*60;

Zeile 226Zeile 226
		$mybb->trigger_generic_error("board_not_upgraded");
}
}

		$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))