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

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 3
 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

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

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

 *

 *

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

 * $Id: upgrade5.php 3054 2007-05-12 22:10:05Z Tikitiki $

 */

/**

 */

/**

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']}';

Zeile 480Zeile 480
		$query = $db->simple_select(TABLE_PREFIX."threads", "tid, firstpost", "closed NOT LIKE 'moved|%'", array("order_by" => "tid", "order_dir" => "asc", "limit" => $tpp, "limit_start" => $start));
while($thread = $db->fetch_array($query))
{

		$query = $db->simple_select(TABLE_PREFIX."threads", "tid, firstpost", "closed NOT LIKE 'moved|%'", array("order_by" => "tid", "order_dir" => "asc", "limit" => $tpp, "limit_start" => $start));
while($thread = $db->fetch_array($query))
{

			update_thread_count($thread['tid']);

			update_thread_counters($thread['tid']);

			if($thread['firstpost'] == 0)
{
update_first_post($thread['tid']);

			if($thread['firstpost'] == 0)
{
update_first_post($thread['tid']);

Zeile 510Zeile 510
	$query = $db->simple_select(TABLE_PREFIX."forums", "fid");
while($forum = $db->fetch_array($query))
{

	$query = $db->simple_select(TABLE_PREFIX."forums", "fid");
while($forum = $db->fetch_array($query))
{

		update_forum_count($forum['fid']);

		update_forum_lastpost($forum['fid']);

	}
echo "<p>Done";
echo "<p>Click next to continue with the upgrade process.</p>";

	}
echo "<p>Done";
echo "<p>Click next to continue with the upgrade process.</p>";