Vergleich inc/init.php - 1.4.5 - 1.4.10

  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: init.php 4305 2009-01-02 08:05:39Z Tikitiki $

 * $Id: init.php 4427 2009-08-13 21:22:07Z RyanGordon $

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 15Zeile 15
	die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}


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


error_reporting(E_ALL & ~E_NOTICE);














if(function_exists("unicode_decode"))
{
// Unicode extension introduced in 6.0
error_reporting(E_ALL ^ E_DEPRECATED ^ E_NOTICE ^ E_STRICT);
}
elseif(defined("E_DEPRECATED"))
{
// E_DEPRECATED introduced in 5.3
error_reporting(E_ALL ^ E_DEPRECATED ^ E_NOTICE);
}
else
{
error_reporting(E_ALL & ~E_NOTICE);
}


/* Defines the root directory for MyBB.


/* Defines the root directory for MyBB.





	Uncomment the below line and set the path manually
if you experience problems. Acceptable values are:

	Uncomment the below line and set the path manually
if you experience problems. Acceptable values are:





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

* Path to your copy of MyBB

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

* Path to your copy of MyBB

Zeile 38Zeile 51
define("TIME_NOW", time());

require_once MYBB_ROOT."inc/functions_compat.php";

define("TIME_NOW", time());

require_once MYBB_ROOT."inc/functions_compat.php";





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


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


Zeile 83Zeile 96
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'])

{

{

	case "sqlite3":
$db = new DB_SQLite3;
break;

	case "sqlite3":
$db = new DB_SQLite3;
break;

Zeile 129Zeile 142

require_once MYBB_ROOT."inc/class_plugins.php";
$plugins = new pluginSystem;


require_once MYBB_ROOT."inc/class_plugins.php";
$plugins = new pluginSystem;





// Include our base data handler class
require_once MYBB_ROOT."inc/datahandler.php";

// Include our base data handler class
require_once MYBB_ROOT."inc/datahandler.php";





// Connect to Database
define("TABLE_PREFIX", $config['database']['table_prefix']);
$db->connect($config['database']);
$db->set_table_prefix(TABLE_PREFIX);
$db->type = $config['database']['type'];

// Connect to Database
define("TABLE_PREFIX", $config['database']['table_prefix']);
$db->connect($config['database']);
$db->set_table_prefix(TABLE_PREFIX);
$db->type = $config['database']['type'];





// Language initialisation
require_once MYBB_ROOT."inc/class_language.php";
$lang = new MyLanguage;
$lang->set_path(MYBB_ROOT."inc/languages");

// Language initialisation
require_once MYBB_ROOT."inc/class_language.php";
$lang = new MyLanguage;
$lang->set_path(MYBB_ROOT."inc/languages");





// Load cache
$cache->cache();


// Load cache
$cache->cache();


Zeile 151Zeile 164
if(file_exists(MYBB_ROOT."inc/settings.php"))
{
require_once MYBB_ROOT."inc/settings.php";

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

}

}


if(!file_exists(MYBB_ROOT."inc/settings.php") || !$settings)
{


if(!file_exists(MYBB_ROOT."inc/settings.php") || !$settings)
{

Zeile 174Zeile 187
		}
$db->free_result($query);
}

		}
$db->free_result($query);
}

}

}


$settings['wolcutoff'] = $settings['wolcutoffmins']*60;
$settings['bbname_orig'] = $settings['bbname'];
$settings['bbname'] = strip_tags($settings['bbname']);
$settings['orig_bblanguage'] = $settings['bblanguage'];


$settings['wolcutoff'] = $settings['wolcutoffmins']*60;
$settings['bbname_orig'] = $settings['bbname'];
$settings['bbname'] = strip_tags($settings['bbname']);
$settings['orig_bblanguage'] = $settings['bblanguage'];





// Fix for people who for some specify a trailing slash on the board URL
if(substr($settings['bburl'], -1) == "/")

// Fix for people who for some specify a trailing slash on the board URL
if(substr($settings['bburl'], -1) == "/")

{

{

	$settings['bburl'] = my_substr($settings['bburl'], 0, -1);

	$settings['bburl'] = my_substr($settings['bburl'], 0, -1);

}

}


$settings['internal'] = $cache->read("internal_settings");
if(!$settings['internal']['encryption_key'])


$settings['internal'] = $cache->read("internal_settings");
if(!$settings['internal']['encryption_key'])

Zeile 197Zeile 210
$mybb->settings = &$settings;
$mybb->parse_cookies();
$mybb->cache = &$cache;

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

 

if($mybb->settings['useshutdownfunc'] != 0)
{
$mybb->use_shutdown = true;
register_shutdown_function(array(&$mybb, "__destruct"));
}


// Load plugins
if(!defined("NO_PLUGINS"))


// Load plugins
if(!defined("NO_PLUGINS"))