Vergleich inc/init.php - 1.8.23 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 46Zeile 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 88Zeile 91
		}
header("Location: ./install/index.php");
exit;

		}
header("Location: ./install/index.php");
exit;

	}


	}


	$mybb->trigger_generic_error("board_not_installed");

	$mybb->trigger_generic_error("board_not_installed");

}


}


if(!is_array($config['database']))

if(!is_array($config['database']))

{

{

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


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


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









if(empty($config['admin_dir']))
{
$config['admin_dir'] = "admin";
}

// Load Settings
$settings = array();

if(file_exists(MYBB_ROOT."inc/settings.php"))

{

{

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


	require_once MYBB_ROOT."inc/settings.php";
$mybb->settings = $settings;

}

// Trigger an error if the installation directory exists

}

// Trigger an error if the installation directory exists

Zeile 111Zeile 123

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



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


Zeile 121Zeile 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 163Zeile 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(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);
}

	rebuild_settings();





















}

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

}

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

Zeile 232Zeile 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))