Vergleich install/resources/upgrade12.php - 1.8.3 - 1.8.24

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 84Zeile 84

$next_act = "12_dbchanges";



$next_act = "12_dbchanges";


	$start = (int)$mybb->input['start'];

	$start = $mybb->get_input('start', MyBB::INPUT_INT);

	$count = $mybb->input['count'];

foreach($to_int as $table => $columns)

	$count = $mybb->input['count'];

foreach($to_int as $table => $columns)

Zeile 177Zeile 177
			echo "<input type=\"hidden\" name=\"{$key}\" value=\"{$val}\" />";
}
global $footer_extra;

			echo "<input type=\"hidden\" name=\"{$key}\" value=\"{$val}\" />";
}
global $footer_extra;

		$footer_extra = "<script type=\"text/javascript\">$(document).ready(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";

		$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";

		$output->print_footer($next_act);
}
else

		$output->print_footer($next_act);
}
else

Zeile 189Zeile 189
		echo "<p><strong>The integrer conversion process is now complete.</strong></p>";
echo "<p>Click next to continue with the upgrade process.</p>";
global $footer_extra;

		echo "<p><strong>The integrer conversion process is now complete.</strong></p>";
echo "<p>Click next to continue with the upgrade process.</p>";
global $footer_extra;

		$footer_extra = "<script type=\"text/javascript\">$(document).ready(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";

		$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";


$output->print_footer($next_act);
}


$output->print_footer($next_act);
}

Zeile 213Zeile 213
	$output->print_contents($contents);

global $footer_extra;

	$output->print_contents($contents);

global $footer_extra;

	$footer_extra = "<script type=\"text/javascript\">$(document).ready(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";

	$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";


$output->print_footer("12_dbchanges_post1");
}


$output->print_footer("12_dbchanges_post1");
}

Zeile 238Zeile 238
	$output->print_contents($contents);

global $footer_extra;

	$output->print_contents($contents);

global $footer_extra;

	$footer_extra = "<script type=\"text/javascript\">$(document).ready(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";

	$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";


$output->print_footer("12_dbchanges_post2");
}


$output->print_footer("12_dbchanges_post2");
}

Zeile 274Zeile 274
	$output->print_contents($contents);

global $footer_extra;

	$output->print_contents($contents);

global $footer_extra;

	$footer_extra = "<script type=\"text/javascript\">$(document).ready(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";

	$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";


$output->print_footer("12_dbchanges_user");
}


$output->print_footer("12_dbchanges_user");
}

Zeile 300Zeile 300
	$output->print_contents($contents);

global $footer_extra;

	$output->print_contents($contents);

global $footer_extra;

	$footer_extra = "<script type=\"text/javascript\">$(document).ready(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";

	$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";


$output->print_footer("12_dbchanges2");
}


$output->print_footer("12_dbchanges2");
}

Zeile 769Zeile 769
	$output->print_contents($contents);

global $footer_extra;

	$output->print_contents($contents);

global $footer_extra;

	$footer_extra = "<script type=\"text/javascript\">$(document).ready(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";

	$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";


$output->print_footer("12_dbchanges3");
}


$output->print_footer("12_dbchanges3");
}

Zeile 845Zeile 845
	$output->print_contents($contents);

global $footer_extra;

	$output->print_contents($contents);

global $footer_extra;

	$footer_extra = "<script type=\"text/javascript\">$(document).ready(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";

	$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";


$output->print_footer("12_dbchanges4");
}


$output->print_footer("12_dbchanges4");
}

Zeile 1042Zeile 1042
			}
}


			}
}


		$db->update_query("adminoptions", array('permissions' => serialize($new_permissions)), "uid = '{$adminoption['uid']}'");

		$db->update_query("adminoptions", array('permissions' => my_serialize($new_permissions)), "uid = '{$adminoption['uid']}'");


$new_permissions = $default_permissions;
}


$new_permissions = $default_permissions;
}

Zeile 1061Zeile 1061
		$db->write_query("ALTER TABLE ".TABLE_PREFIX."adminoptions DROP defaultviews");
}
$db->write_query("ALTER TABLE ".TABLE_PREFIX."adminoptions ADD defaultviews TEXT NOT NULL");

		$db->write_query("ALTER TABLE ".TABLE_PREFIX."adminoptions DROP defaultviews");
}
$db->write_query("ALTER TABLE ".TABLE_PREFIX."adminoptions ADD defaultviews TEXT NOT NULL");

	$db->update_query("adminoptions", array('defaultviews' => serialize(array('user' => 1))));

	$db->update_query("adminoptions", array('defaultviews' => my_serialize(array('user' => 1))));





	require_once MYBB_ROOT."inc/functions_rebuild.php";
rebuild_stats();






	$query = $db->simple_select("forums", "SUM(threads) AS numthreads, SUM(posts) AS numposts, SUM(unapprovedthreads) AS numunapprovedthreads, SUM(unapprovedposts) AS numunapprovedposts");
$stats = $db->fetch_array($query);

$query = $db->simple_select("users", "COUNT(uid) AS users");
$stats['numusers'] = $db->fetch_field($query, 'users');

update_stats($stats, true);


$contents = "Done</p>";
$contents .= "<p>Click next to continue with the upgrade process.</p>";
$output->print_contents($contents);


$contents = "Done</p>";
$contents .= "<p>Click next to continue with the upgrade process.</p>";
$output->print_contents($contents);





	global $footer_extra;

	global $footer_extra;

	$footer_extra = "<script type=\"text/javascript\">$(document).ready(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";

	$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";


$output->print_footer("12_dbchanges5");
}


$output->print_footer("12_dbchanges5");
}

Zeile 1079Zeile 1084
function upgrade12_dbchanges5()
{
global $db, $output, $mybb;

function upgrade12_dbchanges5()
{
global $db, $output, $mybb;





	$output->print_header("Performing Queries");

echo "<p>Performing necessary upgrade queries..</p>";

	$output->print_header("Performing Queries");

echo "<p>Performing necessary upgrade queries..</p>";

Zeile 1164Zeile 1169

$db->write_query("CREATE TABLE ".TABLE_PREFIX."threadviews (
tid int unsigned NOT NULL default '0'


$db->write_query("CREATE TABLE ".TABLE_PREFIX."threadviews (
tid int unsigned NOT NULL default '0'

	) ENGINE=MyISAM{$collation};");

	) ENGINE=MyISAM{$collation};");


$db->write_query("CREATE TABLE ".TABLE_PREFIX."calendars (
cid int unsigned NOT NULL auto_increment,


$db->write_query("CREATE TABLE ".TABLE_PREFIX."calendars (
cid int unsigned NOT NULL auto_increment,

Zeile 1264Zeile 1269
			"type" => $db->escape_string($view['attributes']['type']),
"visibility" => (int)$view['attributes']['visibility'],
"title" => $db->escape_string($view['title'][0]['value']),

			"type" => $db->escape_string($view['attributes']['type']),
"visibility" => (int)$view['attributes']['visibility'],
"title" => $db->escape_string($view['title'][0]['value']),

			"fields" => $db->escape_string(serialize($fields)),
"conditions" => $db->escape_string(serialize($conditions)),

			"fields" => $db->escape_string(my_serialize($fields)),
"conditions" => $db->escape_string(my_serialize($conditions)),

			"sortby" => $db->escape_string($view['sortby'][0]['value']),
"sortorder" => $db->escape_string($view['sortorder'][0]['value']),
"perpage" => (int)$view['perpage'][0]['value'],

			"sortby" => $db->escape_string($view['sortby'][0]['value']),
"sortorder" => $db->escape_string($view['sortorder'][0]['value']),
"perpage" => (int)$view['perpage'][0]['value'],

Zeile 1274Zeile 1279
		$db->insert_query("adminviews", $new_view);
$view_count++;
}

		$db->insert_query("adminviews", $new_view);
$view_count++;
}


$avatardimensions = str_replace('x', '|', my_strtolower($mybb->settings['postmaxavatarsize']));

 

$db->simple_select("users", "uid", "avatar != '' AND avatardimensions = ''");
while($user = $db->fetch_array($query))


$db->simple_select("users", "uid", "avatar != '' AND avatardimensions = ''");
while($user = $db->fetch_array($query))

Zeile 1288Zeile 1291
	$output->print_contents($contents);

global $footer_extra;

	$output->print_contents($contents);

global $footer_extra;

	$footer_extra = "<script type=\"text/javascript\">$(document).ready(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";

	$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";


$output->print_footer("12_redoconfig");
}


$output->print_footer("12_redoconfig");
}

Zeile 1342Zeile 1345
 *
* Please see the MyBB Docs for advanced
* database configuration for larger installations

 *
* Please see the MyBB Docs for advanced
* database configuration for larger installations

 * http://docs.mybb.com/

 * https://docs.mybb.com/

 */

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

 */

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

Zeile 1443Zeile 1446
	echo "<p>Click next to continue with the upgrade process.</p>";

global $footer_extra;

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

global $footer_extra;

	$footer_extra = "<script type=\"text/javascript\">$(document).ready(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";

	$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";


$output->print_footer("12_dbchanges6");
}

function upgrade12_dbchanges6()


$output->print_footer("12_dbchanges6");
}

function upgrade12_dbchanges6()

{
global $db, $output;

$output->print_header("Post IP Conversion");

if(!$_POST['ipspage'])
{
$ipp = 5000;
}
else
{
$ipp = $_POST['ipspage'];
}

if($_POST['ipstart'])

{
global $db, $output;

$output->print_header("Post IP Conversion");

if(!$_POST['ipspage'])
{
$ipp = 5000;
}
else
{
$ipp = (int)$_POST['ipspage'];
}

if($_POST['ipstart'])

	{

	{

		$startat = $_POST['ipstart'];

		$startat = (int)$_POST['ipstart'];

		$upper = $startat+$ipp;
$lower = $startat;
}

		$upper = $startat+$ipp;
$lower = $startat;
}

Zeile 1515Zeile 1518
	$output->print_contents($contents);

global $footer_extra;

	$output->print_contents($contents);

global $footer_extra;

	$footer_extra = "<script type=\"text/javascript\">$(document).ready(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";

	$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";


$output->print_footer($nextact);
}


$output->print_footer($nextact);
}

Zeile 1532Zeile 1535
	}
else
{

	}
else
{

		$ipp = $_POST['ipspage'];

		$ipp = (int)$_POST['ipspage'];

	}

if($_POST['ipstart'])
{

	}

if($_POST['ipstart'])
{

		$startat = $_POST['ipstart'];

		$startat = (int)$_POST['ipstart'];

		$upper = $startat+$ipp;
$lower = $startat;
}

		$upper = $startat+$ipp;
$lower = $startat;
}

Zeile 1599Zeile 1602
	$output->print_contents($contents);

global $footer_extra;

	$output->print_contents($contents);

global $footer_extra;

	$footer_extra = "<script type=\"text/javascript\">$(document).ready(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";

	$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";


$output->print_footer($nextact);
}


$output->print_footer($nextact);
}

Zeile 1616Zeile 1619
	}
else
{

	}
else
{

		$epp = $_POST['eventspage'];

		$epp = (int)$_POST['eventspage'];

	}

if($_POST['eventstart'])
{

	}

if($_POST['eventstart'])
{

		$startat = $_POST['eventstart'];

		$startat = (int)$_POST['eventstart'];

		$upper = $startat+$epp;
$lower = $startat;
}

		$upper = $startat+$epp;
$lower = $startat;
}

Zeile 1763Zeile 1766
	}
$output->print_contents($contents);


	}
$output->print_contents($contents);


	global $footer_extra;
$footer_extra = "<script type=\"text/javascript\">$(document).ready(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";


	global $footer_extra;
$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";


	$output->print_footer($nextact);
}

	$output->print_footer($nextact);
}





function upgrade12_redothemes()
{
global $db, $output, $config, $mybb;

function upgrade12_redothemes()
{
global $db, $output, $config, $mybb;





	$output->print_header("Converting themes");

if(!@is_dir(MYBB_ROOT.'cache/'))

	$output->print_header("Converting themes");

if(!@is_dir(MYBB_ROOT.'cache/'))

	{

	{

		@mkdir(MYBB_ROOT.'cache/', 077);

// Add in empty index.html!

		@mkdir(MYBB_ROOT.'cache/', 077);

// Add in empty index.html!

Zeile 1786Zeile 1789
	}
$cachewritable = @fopen(MYBB_ROOT.'cache/test.write', 'w');
if(!$cachewritable)

	}
$cachewritable = @fopen(MYBB_ROOT.'cache/test.write', 'w');
if(!$cachewritable)

	{
$not_writable = true;
@fclose($cachewritable);

	{
$not_writable = true;
@fclose($cachewritable);

	}
else
{

	}
else
{

Zeile 1861Zeile 1864
	{
$db->drop_table("themestylesheets");
}

	{
$db->drop_table("themestylesheets");
}

 

$collation = $db->build_create_table_collation();


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


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

Zeile 1959Zeile 1964
		$stylesheets['global']['global'][] = $css_url;

// Update the theme

		$stylesheets['global']['global'][] = $css_url;

// Update the theme

		$db->update_query("themes", array("stylesheets" => $db->escape_string(serialize($stylesheets))), "tid='{$theme['tid']}'");

		$db->update_query("themes", array("stylesheets" => $db->escape_string(my_serialize($stylesheets))), "tid='{$theme['tid']}'");

	}

if($db->field_exists('css', "themes"))

	}

if($db->field_exists('css', "themes"))

Zeile 1986Zeile 1991
	echo "<p>Click next to continue with the upgrade process.</p>";

global $footer_extra;

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

global $footer_extra;

	//$footer_extra = "<script type=\"text/javascript\">$(document).ready(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";

	//$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";


$output->print_footer("12_done");
}


$output->print_footer("12_done");
}