Vergleich install/resources/upgrade5.php - 1.2.1 - 1.2.5

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html
*

 * $Id: upgrade5.php 2228 2006-09-17 19:49:10Z Tikitiki $

 * $Id: upgrade5.php 2439 2006-11-26 14:00:13Z CraKteR $

 */

/**

 */

/**

Zeile 123Zeile 123
	
if(!$db->field_exists('allowedgroups', TABLE_PREFIX."themes"))
{

	
if(!$db->field_exists('allowedgroups', TABLE_PREFIX."themes"))
{

		$db->query("ALTER TABLE ".TABLE_PREFIX."themes ADD allowedgroups text NOT NULL default '' AFTER extracss;");

		$db->query("ALTER TABLE ".TABLE_PREFIX."themes ADD allowedgroups text NOT NULL AFTER extracss;");

	}

if(!$db->field_exists('canmovetononmodforum', TABLE_PREFIX."moderators"))

	}

if(!$db->field_exists('canmovetononmodforum', TABLE_PREFIX."moderators"))

Zeile 148Zeile 148
	$db->query("CREATE TABLE ".TABLE_PREFIX."mycode (
cid int unsigned NOT NULL auto_increment,
title varchar(100) NOT NULL default '',

	$db->query("CREATE TABLE ".TABLE_PREFIX."mycode (
cid int unsigned NOT NULL auto_increment,
title varchar(100) NOT NULL default '',

		    description text NOT NULL default '',
regex text NOT NULL default '',
replacement text NOT NULL default '',

		    description text NOT NULL,
regex text NOT NULL,
replacement text NOT NULL,

		    active char(3) NOT NULL default '',
PRIMARY KEY(cid)
) TYPE=MyISAM;");

		    active char(3) NOT NULL default '',
PRIMARY KEY(cid)
) TYPE=MyISAM;");

Zeile 196Zeile 196
		  uid int unsigned NOT NULL default '0',
dateline bigint(30) NOT NULL default '0',
ipaddress varchar(120) NOT NULL default '',

		  uid int unsigned NOT NULL default '0',
dateline bigint(30) NOT NULL default '0',
ipaddress varchar(120) NOT NULL default '',

		  threads text NOT NULL default '',
posts text NOT NULL default '',

		  threads text NOT NULL,
posts text NOT NULL,

		  searchtype varchar(10) NOT NULL default '',
resulttype varchar(10) NOT NULL default '',

		  searchtype varchar(10) NOT NULL default '',
resulttype varchar(10) NOT NULL default '',

		  querycache text NOT NULL default '',

		  querycache text NOT NULL,

		  PRIMARY KEY  (sid)
) TYPE=MyISAM;");


		  PRIMARY KEY  (sid)
) TYPE=MyISAM;");


Zeile 223Zeile 223
	$bannedips = $db->fetch_field($query, 'sid');
$bannedips = explode(" ", $bannedips);
$bannedips = implode(",", $bannedips);

	$bannedips = $db->fetch_field($query, 'sid');
$bannedips = explode(" ", $bannedips);
$bannedips = implode(",", $bannedips);

	$query = $db->query("UPDATE ".TABLE_PREFIX."settings SET value='".$db->escape_string($bannedips)."' WHERE name='bannedips'");

	$db->query("UPDATE ".TABLE_PREFIX."settings SET value='".$db->escape_string($bannedips)."' WHERE name='bannedips'");





	$query = $db->query("DROP TABLE IF EXISTS ".TABLE_PREFIX."reputation");

	$db->query("DROP TABLE IF EXISTS ".TABLE_PREFIX."reputation");





	$query = $db->query("CREATE TABLE ".TABLE_PREFIX."reputation (

	$db->query("CREATE TABLE ".TABLE_PREFIX."reputation (

	  rid int unsigned NOT NULL auto_increment,
uid int unsigned NOT NULL default '0',
adduid int unsigned NOT NULL default '0',

	  rid int unsigned NOT NULL auto_increment,
uid int unsigned NOT NULL default '0',
adduid int unsigned NOT NULL default '0',

Zeile 238Zeile 238
	) TYPE=MyISAM;");

$db->query("DROP TABLE IF EXISTS ".TABLE_PREFIX."mailqueue");

	) TYPE=MyISAM;");

$db->query("DROP TABLE IF EXISTS ".TABLE_PREFIX."mailqueue");

	$query = $db->query("CREATE TABLE ".TABLE_PREFIX."mailqueue (

	$db->query("CREATE TABLE ".TABLE_PREFIX."mailqueue (

		mid int unsigned NOT NULL auto_increment,
mailto varchar(200) NOT NULL,
mailfrom varchar(200) NOT NULL,

		mid int unsigned NOT NULL auto_increment,
mailto varchar(200) NOT NULL,
mailfrom varchar(200) NOT NULL,

Zeile 304Zeile 304

if(!$db->field_exists('data', TABLE_PREFIX."moderatorlog"))
{


if(!$db->field_exists('data', TABLE_PREFIX."moderatorlog"))
{

		$db->query("ALTER TABLE ".TABLE_PREFIX."moderatorlog ADD data text NOT NULL default '' AFTER action;");

		$db->query("ALTER TABLE ".TABLE_PREFIX."moderatorlog ADD data text NOT NULL AFTER action;");

	}

$db->query("DROP TABLE IF EXISTS ".TABLE_PREFIX."adminsessions");

	}

$db->query("DROP TABLE IF EXISTS ".TABLE_PREFIX."adminsessions");

Zeile 372Zeile 372
		exit;
}


		exit;
}


	$fh = @fopen(MYBB_ROOT."/inc/config.php", "w");

	$fh = @fopen(MYBB_ROOT."inc/config.php", "w");

	if(!$fh)
{
echo "<p><span style=\"color: red; font-weight: bold;\">Unable to open inc/config.php</span><br />Before the upgrade process can continue, you need to changes the permissions of inc/config.php so it is writable.</p><input type=\"hidden\" name=\"uid\" value=\"{$uid}\" />";

	if(!$fh)
{
echo "<p><span style=\"color: red; font-weight: bold;\">Unable to open inc/config.php</span><br />Before the upgrade process can continue, you need to changes the permissions of inc/config.php so it is writable.</p><input type=\"hidden\" name=\"uid\" value=\"{$uid}\" />";

Zeile 391Zeile 391
	}
$configdata = "<?php
/**

	}
$configdata = "<?php
/**

 * Daatabase configuration

 * Database configuration

 */

\$config['dbtype'] = '{$config['dbtype']}';

 */

\$config['dbtype'] = '{$config['dbtype']}';