Vergleich install/upgrade.php - 1.4.2 - 1.4.4

  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 4172 2008-09-03 00:30:14Z Tikitiki $

 * $Id: upgrade.php 4271 2008-11-16 06:20:15Z Tikitiki $

 */
error_reporting(E_ALL & ~E_NOTICE);


 */
error_reporting(E_ALL & ~E_NOTICE);


Zeile 14Zeile 14
define("INSTALL_ROOT", dirname(__FILE__)."/");
define("TIME_NOW", time());
define('IN_MYBB', 1);

define("INSTALL_ROOT", dirname(__FILE__)."/");
define("TIME_NOW", time());
define('IN_MYBB', 1);

 
define("IN_UPGRADE", 1);


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


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

Zeile 174Zeile 175
		$user = $db->fetch_array($query);
if(!$user['uid'])
{

		$user = $db->fetch_array($query);
if(!$user['uid'])
{

			$output->print_error("The password you entered is incorrect. If you have forgotten your password, click <a href=\"../member.php?action=lostpw\">here</a>. Otherwise, go back and try again.");

			$output->print_error("The username you have entered appears to be invalid.");

		}
else
{
$user = validate_password_from_uid($user['uid'], $mybb->input['password'], $user);

		}
else
{
$user = validate_password_from_uid($user['uid'], $mybb->input['password'], $user);

 
			if(!$user['uid'])
{
$output->print_error("The password you entered is incorrect. If you have forgotten your password, click <a href=\"../member.php?action=lostpw\">here</a>. Otherwise, go back and try again.");
}

		}

$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."'");

Zeile 201Zeile 206
	$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 246Zeile 251
		if($db->table_exists("upgrade_data"))
{
$db->drop_table("upgrade_data");

		if($db->table_exists("upgrade_data"))
{
$db->drop_table("upgrade_data");

		}

		}

		$db->write_query("CREATE TABLE ".TABLE_PREFIX."upgrade_data (
title varchar(30) NOT NULL,
contents text NOT NULL,

		$db->write_query("CREATE TABLE ".TABLE_PREFIX."upgrade_data (
title varchar(30) NOT NULL,
contents text NOT NULL,

Zeile 459Zeile 464
	// Now deal with the master templates
$contents = @file_get_contents(INSTALL_ROOT.'resources/mybb_theme.xml');
$parser = new XMLParser($contents);

	// Now deal with the master templates
$contents = @file_get_contents(INSTALL_ROOT.'resources/mybb_theme.xml');
$parser = new XMLParser($contents);

	$tree = $parser->get_tree();

	$tree = $parser->get_tree();


$theme = $tree['theme'];



$theme = $tree['theme'];


Zeile 672Zeile 677
}

function add_upgrade_store($title, $contents)

}

function add_upgrade_store($title, $contents)

{
global $db;

{
global $db;

	
$replace_array = array(
"title" => $db->escape_string($title),

	
$replace_array = array(
"title" => $db->escape_string($title),

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

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

		) TYPE=MyISAM;");

$db->drop_table("settings");

		) TYPE=MyISAM;");

$db->drop_table("settings");


$db->write_query("CREATE TABLE ".TABLE_PREFIX."settings (
sid smallint unsigned NOT NULL auto_increment,


$db->write_query("CREATE TABLE ".TABLE_PREFIX."settings (
sid smallint unsigned NOT NULL auto_increment,

Zeile 718Zeile 723
	else
{
if($db->type == "mysql" || $db->type == "mysqli")

	else
{
if($db->type == "mysql" || $db->type == "mysqli")

        {

        {

            $wheresettings = "isdefault='1' OR isdefault='yes'";
}
else

            $wheresettings = "isdefault='1' OR isdefault='yes'";
}
else

Zeile 744Zeile 749
	$tree = $parser->get_tree();
$settinggroupnames = array();
$settingnames = array();

	$tree = $parser->get_tree();
$settinggroupnames = array();
$settingnames = array();

	



	foreach($tree['settings'][0]['settinggroup'] as $settinggroup)
{
$settinggroupnames[] = $settinggroup['attributes']['name'];

	foreach($tree['settings'][0]['settinggroup'] as $settinggroup)
{
$settinggroupnames[] = $settinggroup['attributes']['name'];