Vergleich install/upgrade.php - 1.4.1 - 1.4.3

  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: upgrade.php 4120 2008-08-16 02:40:05Z Tikitiki $

 * $Id: upgrade.php 4172 2008-09-03 00:30:14Z Tikitiki $

 */
error_reporting(E_ALL & ~E_NOTICE);


 */
error_reporting(E_ALL & ~E_NOTICE);


Zeile 69Zeile 69
define('TABLE_PREFIX', $config['database']['table_prefix']);
$db->connect($config['database']);
$db->set_table_prefix(TABLE_PREFIX);

define('TABLE_PREFIX', $config['database']['table_prefix']);
$db->connect($config['database']);
$db->set_table_prefix(TABLE_PREFIX);

 
$db->type = $config['database']['type'];


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


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

Zeile 181Zeile 182
		}

$db->delete_query("sessions", "ip='".$db->escape_string($session->ipaddress)."' AND sid != '".$session->sid."'");

		}

$db->delete_query("sessions", "ip='".$db->escape_string($session->ipaddress)."' AND sid != '".$session->sid."'");

 
		

		$newsession = array(

		$newsession = array(

			"uid" => $user['uid'],
"loginattempts" => 1,

			"uid" => $user['uid']


		);

		);

 
		

		$db->update_query("sessions", $newsession, "sid='".$session->sid."'");

// Temporarily set the cookie remember option for the login cookies

		$db->update_query("sessions", $newsession, "sid='".$session->sid."'");

// Temporarily set the cookie remember option for the login cookies

Zeile 313Zeile 315
		{
add_upgrade_store("startscript", $mybb->input['from']);
$runfunction = next_function($mybb->input['from']);

		{
add_upgrade_store("startscript", $mybb->input['from']);
$runfunction = next_function($mybb->input['from']);

		}
}

		}
}

	$currentscript = get_upgrade_store("currentscript");
$system_upgrade_detail = get_upgrade_store("upgradedetail");


	$currentscript = get_upgrade_store("currentscript");
$system_upgrade_detail = get_upgrade_store("upgradedetail");


Zeile 446Zeile 448
		else
{
$output->print_error();

		else
{
$output->print_error();

		}

		}

		
// Import master theme
import_theme_xml($contents, array("tid" => 1, "no_templates" => 1));

		
// Import master theme
import_theme_xml($contents, array("tid" => 1, "no_templates" => 1));

Zeile 578Zeile 580
	
// Rebuild inc/settings.php at the end of the upgrade
if(function_exists('rebuild_settings'))

	
// Rebuild inc/settings.php at the end of the upgrade
if(function_exists('rebuild_settings'))

	{

	{

		rebuild_settings();
}
else

		rebuild_settings();
}
else

Zeile 603Zeile 605
function whatsnext()
{
global $output, $db, $system_upgrade_detail, $lang;

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





	if($system_upgrade_detail['revert_all_templates'] > 0)

	if($system_upgrade_detail['revert_all_templates'] > 0)

	{

	{

		$output->print_header($lang->upgrade_template_reversion);
$output->print_contents($lang->upgrade_template_reversion_success);
$output->print_footer("templates");

		$output->print_header($lang->upgrade_template_reversion);
$output->print_contents($lang->upgrade_template_reversion_success);
$output->print_footer("templates");

	}
else
{

	}
else
{

		upgradethemes();
}
}

		upgradethemes();
}
}

Zeile 644Zeile 646
function load_module($module)
{
global $system_upgrade_detail, $currentscript, $upgrade_detail;

function load_module($module)
{
global $system_upgrade_detail, $currentscript, $upgrade_detail;

	

	

	require_once INSTALL_ROOT."resources/".$module;
if($currentscript != $module)
{

	require_once INSTALL_ROOT."resources/".$module;
if($currentscript != $module)
{

Zeile 661Zeile 663
}

function get_upgrade_store($title)

}

function get_upgrade_store($title)

{

{

	global $db;

$query = $db->simple_select("upgrade_data", "*", "title='".$db->escape_string($title)."'");

	global $db;

$query = $db->simple_select("upgrade_data", "*", "title='".$db->escape_string($title)."'");

Zeile 686Zeile 688
	
$settingcount = $groupcount = 0;
if($redo == 2)

	
$settingcount = $groupcount = 0;
if($redo == 2)

	{

	{

		$db->drop_table("settinggroups");
$db->write_query("CREATE TABLE ".TABLE_PREFIX."settinggroups (
gid smallint unsigned NOT NULL auto_increment,

		$db->drop_table("settinggroups");
$db->write_query("CREATE TABLE ".TABLE_PREFIX."settinggroups (
gid smallint unsigned NOT NULL auto_increment,

Zeile 701Zeile 703
		$db->drop_table("settings");

$db->write_query("CREATE TABLE ".TABLE_PREFIX."settings (

		$db->drop_table("settings");

$db->write_query("CREATE TABLE ".TABLE_PREFIX."settings (

		  sid smallint(6) NOT NULL auto_increment,

		  sid smallint unsigned NOT NULL auto_increment,

		  name varchar(120) NOT NULL default '',
title varchar(120) NOT NULL default '',
description text NOT NULL,
optionscode text NOT NULL,
value text NOT NULL,

		  name varchar(120) NOT NULL default '',
title varchar(120) NOT NULL default '',
description text NOT NULL,
optionscode text NOT NULL,
value text NOT NULL,

		  disporder smallint(6) NOT NULL default '0',
gid smallint(6) NOT NULL default '0',
PRIMARY KEY (sid)


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

		) TYPE=MyISAM;");
}
else
{

		) TYPE=MyISAM;");
}
else
{

		$query = $db->simple_select("settings", "name,sid", "isdefault='1' OR isdefault='yes'");










		if($db->type == "mysql" || $db->type == "mysqli")
{
$wheresettings = "isdefault='1' OR isdefault='yes'";
}
else
{
$wheresettings = "isdefault='1'";
}

$query = $db->simple_select("settings", "name,sid", $wheresettings);

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


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


		$query = $db->simple_select("settinggroups", "name,title,gid", "isdefault='1' OR isdefault='yes'");

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

		while($group = $db->fetch_array($query))
{
$settinggroups[$group['name']] = $group['gid'];

		while($group = $db->fetch_array($query))
{
$settinggroups[$group['name']] = $group['gid'];