Zeile 6 | Zeile 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 4271 2008-11-16 06:20:15Z Tikitiki $
| * $Id: upgrade.php 4416 2009-08-07 02:11:52Z RyanGordon $
|
*/ error_reporting(E_ALL & ~E_NOTICE);
| */ error_reporting(E_ALL & ~E_NOTICE);
|
Zeile 292 | Zeile 292 |
---|
unset($upgradescripts); unset($upgradescript);
|
unset($upgradescripts); unset($upgradescript);
|
$output->print_contents($lang->sprintf($lang->upgrade_welcome, $mybb->version)."<p><select name=\"from\">$vers</select>");
| $output->print_contents($lang->sprintf($lang->upgrade_welcome, $mybb->version)."<p><select name=\"from\">$vers</select>".$lang->upgrade_send_stats);
|
$output->print_footer("doupgrade"); } elseif($mybb->input['action'] == "doupgrade") {
|
$output->print_footer("doupgrade"); } elseif($mybb->input['action'] == "doupgrade") {
|
| add_upgrade_store("allow_anonymous_info", intval($mybb->input['allow_anonymous_info']));
|
require_once INSTALL_ROOT."resources/upgrade".intval($mybb->input['from']).".php"; if($db->table_exists("datacache") && $upgrade_detail['requires_deactivated_plugins'] == 1 && $mybb->input['donewarning'] != "true") {
| require_once INSTALL_ROOT."resources/upgrade".intval($mybb->input['from']).".php"; if($db->table_exists("datacache") && $upgrade_detail['requires_deactivated_plugins'] == 1 && $mybb->input['donewarning'] != "true") {
|
Zeile 380 | Zeile 381 |
---|
status varchar(10) NOT NULL default '', dateline int(10) NOT NULL default '0', PRIMARY KEY (tid)
|
status varchar(10) NOT NULL default '', dateline int(10) NOT NULL default '0', PRIMARY KEY (tid)
|
) TYPE=MyISAM;{$charset}");
| ) TYPE=MyISAM{$charset};");
|
}
if($system_upgrade_detail['revert_all_themes'] > 0)
| }
if($system_upgrade_detail['revert_all_themes'] > 0)
|
Zeile 422 | Zeile 423 |
---|
{ $output->print_error("Please make sure your admin directory is uploaded correctly."); }
|
{ $output->print_error("Please make sure your admin directory is uploaded correctly."); }
|
import_theme_xml($contents, array("templateset" => -2, "no_templates" => 1));
| import_theme_xml($contents, array("templateset" => -2, "no_templates" => 1, "version_compat" => 1));
|
$tid = build_new_theme("Default", null, 1);
$db->update_query("themes", array("def" => 1), "tid='{$tid}'");
| $tid = build_new_theme("Default", null, 1);
$db->update_query("themes", array("def" => 1), "tid='{$tid}'");
|
Zeile 456 | Zeile 457 |
---|
} // Import master theme
|
} // Import master theme
|
import_theme_xml($contents, array("tid" => 1, "no_templates" => 1));
| import_theme_xml($contents, array("tid" => 1, "no_templates" => 1, "version_compat" => 1));
|
}
$sid = -2;
| }
$sid = -2;
|
Zeile 500 | Zeile 501 |
---|
$db->insert_query("templates", $insert_array); ++$newcount;
|
$db->insert_query("templates", $insert_array); ++$newcount;
|
} } }
| } } }
|
$output->print_contents($lang->upgrade_templates_reverted_success); $output->print_footer("rebuildsettings");
| $output->print_contents($lang->upgrade_templates_reverted_success); $output->print_footer("rebuildsettings");
|
Zeile 566 | Zeile 567 |
---|
function upgradedone() { global $db, $output, $mybb, $lang, $config;
|
function upgradedone() { global $db, $output, $mybb, $lang, $config;
|
| ob_start();
|
$output->print_header("Upgrade Complete");
|
$output->print_header("Upgrade Complete");
|
if(is_writable("./"))
| $allow_anonymous_info = get_upgrade_store("allow_anonymous_info"); if($allow_anonymous_info == 1) { require_once MYBB_ROOT."inc/functions_serverstats.php"; $build_server_stats = build_server_stats(0, '', $mybb->version_code, $mybb->config['database']['encoding']); if($build_server_stats['info_sent_success'] == false) { echo $build_server_stats['info_image']; } } ob_end_flush(); if(is_writable("./"))
|
{ $lock = @fopen("./lock", "w"); $written = @fwrite($lock, "1");
| { $lock = @fopen("./lock", "w"); $written = @fwrite($lock, "1");
|
Zeile 581 | Zeile 598 |
---|
if(!$written) { $lock_note = "<p><b><span style=\"color: red;\">".$lang->upgrade_removedir."</span></b></p>";
|
if(!$written) { $lock_note = "<p><b><span style=\"color: red;\">".$lang->upgrade_removedir."</span></b></p>";
|
}
| }
|
// 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 605 | Zeile 622 |
---|
$output->print_contents($lang->sprintf($lang->upgrade_congrats, $mybb->version, $lock_note)); $output->print_footer();
|
$output->print_contents($lang->sprintf($lang->upgrade_congrats, $mybb->version, $lock_note)); $output->print_footer();
|
}
| }
|
function whatsnext() {
| function whatsnext() {
|
Zeile 620 | Zeile 637 |
---|
else { upgradethemes();
|
else { upgradethemes();
|
} }
| } }
|
function next_function($from, $func="dbchanges") {
| function next_function($from, $func="dbchanges") {
|
Zeile 701 | Zeile 718 |
---|
title varchar(220) NOT NULL default '', description text NOT NULL, disporder smallint unsigned NOT NULL default '0',
|
title varchar(220) NOT NULL default '', description text NOT NULL, disporder smallint unsigned NOT NULL default '0',
|
isdefault int(1) NOT NULL default '',
| isdefault int(1) NOT NULL default '0',
|
PRIMARY KEY (gid) ) TYPE=MyISAM;");
| PRIMARY KEY (gid) ) TYPE=MyISAM;");
|
Zeile 809 | Zeile 826 |
---|
require MYBB_ROOT."inc/settings.php"; foreach($settings as $key => $val) {
|
require MYBB_ROOT."inc/settings.php"; foreach($settings as $key => $val) {
|
$db->update_query("settings", array('value' => $db->escape_string($val)), "name='$key'");
| $db->update_query("settings", array('value' => $db->escape_string($val)), "name='".$db->escape_string($key)."'");
|
} } unset($settings);
| } } unset($settings);
|