mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
More upgrade fixes for b2.
git-svn-id: http://svn.automattic.com/wordpress/trunk@763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
faeebc5bda
commit
6d53fe05ef
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
if (!file_exists('../wp-config.php')) die("There doesn't seem to be a wp-config.php file. Double check that you updated wp-config.sample.php with the proper database connection information and renamed it to wp-config.php.");
|
||||
require_once('../wp-config.php');
|
||||
|
||||
require('upgrade-functions.php');
|
||||
$step = $HTTP_GET_VARS['step'];
|
||||
if (!$step) $step = 0;
|
||||
?>
|
||||
@ -240,13 +240,10 @@ flush();
|
||||
$query = "ALTER TABLE $tableusers DROP INDEX ID";
|
||||
|
||||
$q = $wpdb->query($query);
|
||||
upgrade_071();
|
||||
upgrade_072();
|
||||
upgrade_100();
|
||||
upgrade_all();
|
||||
?>
|
||||
|
||||
<p>Don't forget to CHMOD the <code>weblogs.com.changes.cache</code> file and you'll
|
||||
be A-okay. Welcome to the family.</p>
|
||||
<p>Welcome to the family. <a href="../">Have fun</a>!</p>
|
||||
<?php
|
||||
break;
|
||||
}
|
||||
|
@ -165,8 +165,10 @@ function upgrade_072() {
|
||||
}
|
||||
}
|
||||
|
||||
// Guess a site URI
|
||||
$guessurl = preg_replace('|/wp-admin/.*|i', '', 'http://' . $HTTP_HOST . $REQUEST_URI);
|
||||
$option_data = array( //base options from b2cofig
|
||||
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (1,'siteurl', 3, 'http://example.com', 'siteurl is your blog\'s URL: for example, \'http://example.com/wordpress\' (no trailing slash !)', 8, 30)",
|
||||
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (1,'siteurl', 3, '$guessurl', 'siteurl is your blog\'s URL: for example, \'http://example.com/wordpress\'', 8, 30)",
|
||||
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (2,'blogfilename', 3, 'index.php', 'blogfilename is the name of the default file for your blog', 8, 20)",
|
||||
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (3,'blogname', 3, 'my weblog', 'blogname is the name of your blog', 8, 20)",
|
||||
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (4,'blogdescription', 3, 'babblings!', 'blogdescription is the description of your blog', 8, 40)",
|
||||
|
@ -44,7 +44,7 @@ require (ABSPATH . WPINC . '/kses.php');
|
||||
// We should eventually migrate to either calling
|
||||
// get_settings() wherever these are needed OR
|
||||
// accessing a single global $all_settings var
|
||||
if (!strstr($HTTP_SERVER_VARS['REQUEST_URI'], 'install.php')) {
|
||||
if (!strstr($HTTP_SERVER_VARS['REQUEST_URI'], 'install.php') && !strstr($HTTP_SERVER_VARS['REQUEST_URI'], 'wp-admin/import')) {
|
||||
$siteurl = get_settings('siteurl');
|
||||
// "When trying to design a foolproof system,
|
||||
// never underestimate the ingenuity of the fools :)"
|
||||
|
Loading…
Reference in New Issue
Block a user