Vergleich install/upgrade.php - 1.6.3 - 1.6.12

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: upgrade.php 5440 2011-04-15 10:18:35Z Tomm $

 * $Id$

 */

 */


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);
}

 

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


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

Zeile 34Zeile 19
{
date_default_timezone_set('GMT');
}

{
date_default_timezone_set('GMT');
}

 

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


require_once MYBB_ROOT."inc/class_core.php";
$mybb = new MyBB;


require_once MYBB_ROOT."inc/class_core.php";
$mybb = new MyBB;

Zeile 231Zeile 219
	$output->steps = array($lang->upgrade);

if($mybb->user['uid'] == 0)

	$output->steps = array($lang->upgrade);

if($mybb->user['uid'] == 0)

	{

	{

		$output->print_header("Please Login", "errormsg", 0, 1);

$output->print_contents('<p>Please enter your username and password to begin the upgrade process. You must be a valid forum administrator to perform the upgrade.</p>

		$output->print_header("Please Login", "errormsg", 0, 1);

$output->print_contents('<p>Please enter your username and password to begin the upgrade process. You must be a valid forum administrator to perform the upgrade.</p>

Zeile 339Zeile 327
		require_once INSTALL_ROOT."resources/upgrade".intval($mybb->input['from']).".php";
if($db->table_exists("datacache") && $upgrade_detail['requires_deactivated_plugins'] == 1 && $mybb->input['donewarning'] != "true")
{

		require_once INSTALL_ROOT."resources/upgrade".intval($mybb->input['from']).".php";
if($db->table_exists("datacache") && $upgrade_detail['requires_deactivated_plugins'] == 1 && $mybb->input['donewarning'] != "true")
{

			require_once MYBB_ROOT."inc/class_datacache.php";
$cache = new datacache;

 
			$plugins = $cache->read('plugins', true);
if(!empty($plugins['active']))
{

			$plugins = $cache->read('plugins', true);
if(!empty($plugins['active']))
{

Zeile 450Zeile 436
		$contents = @file_get_contents(INSTALL_ROOT.'resources/mybb_theme.xml');
if(file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions_themes.php"))
{

		$contents = @file_get_contents(INSTALL_ROOT.'resources/mybb_theme.xml');
if(file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions_themes.php"))
{

 
			require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php";

			require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions_themes.php";
}
else if(file_exists(MYBB_ROOT."admin/inc/functions_themes.php"))
{

			require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions_themes.php";
}
else if(file_exists(MYBB_ROOT."admin/inc/functions_themes.php"))
{

 
			require_once MYBB_ROOT."admin/inc/functions.php";

			require_once MYBB_ROOT."admin/inc/functions_themes.php";
}
else

			require_once MYBB_ROOT."admin/inc/functions_themes.php";
}
else

Zeile 544Zeile 532

$output->print_contents($lang->upgrade_templates_reverted_success);
$output->print_footer("rebuildsettings");


$output->print_contents($lang->upgrade_templates_reverted_success);
$output->print_footer("rebuildsettings");

}


}


function buildsettings()
{
global $db, $output, $system_upgrade_detail, $lang;

function buildsettings()
{
global $db, $output, $system_upgrade_detail, $lang;

Zeile 595Zeile 583
	$cache->update_most_replied_threads();
$cache->update_most_viewed_threads();
$cache->update_groupleaders();

	$cache->update_most_replied_threads();
$cache->update_most_viewed_threads();
$cache->update_groupleaders();

 
	$cache->update_threadprefixes();
$cache->update_forumsdisplay();


$contents .= $lang->done."</p>";



$contents .= $lang->done."</p>";


Zeile 753Zeile 743
	$settingcount = $groupcount = 0;
$settings = $settinggroups = array();
if($redo == 2)

	$settingcount = $groupcount = 0;
$settings = $settinggroups = array();
if($redo == 2)

	{

	{

		$db->drop_table("settinggroups");
switch($db->type)
{

		$db->drop_table("settinggroups");
switch($db->type)
{

Zeile 766Zeile 756
				  disporder smallint NOT NULL default '0',
isdefault int NOT NULL default '0',
PRIMARY KEY (gid)

				  disporder smallint NOT NULL default '0',
isdefault int NOT NULL default '0',
PRIMARY KEY (gid)

				);");
break;

				);");
break;

			case "sqlite":
$db->write_query("CREATE TABLE ".TABLE_PREFIX."settinggroups (
gid INTEGER PRIMARY KEY,

			case "sqlite":
$db->write_query("CREATE TABLE ".TABLE_PREFIX."settinggroups (
gid INTEGER PRIMARY KEY,

				  name varchar(100) NOT NULL default '',
title varchar(220) NOT NULL default '',
description TEXT NOT NULL,
disporder smallint NOT NULL default '0',
isdefault int(1) NOT NULL default '0'
);");
break;
case "mysql":
default:

				  name varchar(100) NOT NULL default '',
title varchar(220) NOT NULL default '',
description TEXT NOT NULL,
disporder smallint NOT NULL default '0',
isdefault int(1) NOT NULL default '0'
);");
break;
case "mysql":
default:

				$db->write_query("CREATE TABLE ".TABLE_PREFIX."settinggroups (
gid smallint unsigned NOT NULL auto_increment,
name varchar(100) NOT NULL default '',

				$db->write_query("CREATE TABLE ".TABLE_PREFIX."settinggroups (
gid smallint unsigned NOT NULL auto_increment,
name varchar(100) NOT NULL default '',

Zeile 792Zeile 782
		}

$db->drop_table("settings");

		}

$db->drop_table("settings");

		

		

		switch($db->type)
{
case "pgsql":

		switch($db->type)
{
case "pgsql":

Zeile 848Zeile 838
        {
$wheresettings = "isdefault='1'";
}

        {
$wheresettings = "isdefault='1'";
}

		
$query = $db->simple_select("settings", "name,sid", $wheresettings);
while($setting = $db->fetch_array($query))
{
$settings[$setting['name']] = $setting['sid'];
}










		$query = $db->simple_select("settinggroups", "name,title,gid", $wheresettings);
while($group = $db->fetch_array($query))

		$query = $db->simple_select("settinggroups", "name,title,gid", $wheresettings);
while($group = $db->fetch_array($query))

		{

		{

			$settinggroups[$group['name']] = $group['gid'];

			$settinggroups[$group['name']] = $group['gid'];

 
		}

// Collect all the user's settings - regardless of 'defaultivity' - we'll check them all
// against default settings and insert/update them accordingly
$query = $db->simple_select("settings", "name,sid");
while($setting = $db->fetch_array($query))
{
$settings[$setting['name']] = $setting['sid'];

		}
}
$settings_xml = file_get_contents(INSTALL_ROOT."resources/settings.xml");

		}
}
$settings_xml = file_get_contents(INSTALL_ROOT."resources/settings.xml");