From faeebc5bda2021cb9a168c5bc769ffd700ad1e02 Mon Sep 17 00:00:00 2001
From: saxmatt
Date: Mon, 12 Jan 2004 12:12:45 +0000
Subject: [PATCH] Upgrade and import fixes.
git-svn-id: http://svn.automattic.com/wordpress/trunk@762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
---
wp-admin/import-blogger.php | 11 ++-----
wp-admin/import-greymatter.php | 5 ++-
wp-admin/import-textpattern.php | 57 ++++++++-------------------------
wp-admin/upgrade-functions.php | 7 ++++
wp-admin/upgrade.php | 5 +--
5 files changed, 28 insertions(+), 57 deletions(-)
diff --git a/wp-admin/import-blogger.php b/wp-admin/import-blogger.php
index 6c477464c..8c6667fa3 100644
--- a/wp-admin/import-blogger.php
+++ b/wp-admin/import-blogger.php
@@ -15,16 +15,11 @@ for ($i=0; $i
@@ -158,7 +153,7 @@ case "step1":
here's the bugfix: */
$result = $wpdb->query("DELETE FROM $tableposts WHERE post_date=\"0000-00-00 00:00:00\"");
-
+ upgrade_all();
?>
Done
diff --git a/wp-admin/import-greymatter.php b/wp-admin/import-greymatter.php
index ae6c7250a..900bed588 100644
--- a/wp-admin/import-greymatter.php
+++ b/wp-admin/import-greymatter.php
@@ -6,6 +6,7 @@
require_once('../wp-config.php');
require_once(ABSPATH.WPINC.'/functions.php');
+require('upgrade-functions.php');
$wpvarstoreset = array('action', 'gmpath', 'archivespath');
for ($i=0; $iDone";
}
- } ?>
+ }
+ upgrade_all();
+ ?>
Done
Completed GM 2 b2 import !
diff --git a/wp-admin/import-textpattern.php b/wp-admin/import-textpattern.php
index 072f5b468..64ad06b4b 100644
--- a/wp-admin/import-textpattern.php
+++ b/wp-admin/import-textpattern.php
@@ -2,14 +2,14 @@
// For security reasons, fill in the connection details to your Textpattern database below:
-$tp_database_name = 'wordpres_test';
-$tp_database_username = 'wordpres_test';
-$tp_database_password = 'test';
+$tp_database_name = 'textpattern';
+$tp_database_username = 'username';
+$tp_database_password = 'password';
$tp_database_host = 'localhost';
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('../wp-config.php');
-require('install-helper.php');
+require('upgrade-functions.php');
$step = $HTTP_GET_VARS['step'];
if (!$step) $step = 0;
@@ -29,14 +29,14 @@ if (!$step) $step = 0;
padding: 0;
background-image: url(http://wordpress.org/images/wordpress.gif);
background-repeat: no-repeat;
- height: 72px;
+ height: 60px;
border-bottom: 4px solid #333;
}
#logo a {
display: block;
text-decoration: none;
text-indent: -100em;
- height: 72px;
+ height: 60px;
}
p {
line-height: 140%;
@@ -60,7 +60,7 @@ if ($connection && $database) {
-It doesn't look like your database information is correct. Please re-edit this file and double-check all the settings.
+It doesn't look like your database information is incorrect. Please re-edit this file and double-check all the settings.
query("INSERT INTO $tableposts
- (post_author, post_date, post_content, post_title, post_category, post_name)
+ (post_author, post_date, post_content, post_title, post_category, post_name, post_status)
VALUES
- ('$author', '$posted', '$content', '$title', '$category', '$post_name')");
+ ('$author', '$posted', '$content', '$title', '$category', '$post_name', 'publish')");
// Get wordpress post id
$wp_post_ID = $wpdb->get_var("SELECT ID FROM $tableposts ORDER BY ID DESC LIMIT 1");
@@ -125,44 +125,13 @@ while ($post = mysql_fetch_array($posts)) {
}
}
-?>
-Done.
-Now let's populate the new field.
-Working
-
- Done.
- Now on to step 2.
-
- Step 2
- Now we need to adjust some option data (don't worry this won't change any of your settings.)
- Working
+
All done. Wasn’t that fun? Have fun.
query("UPDATE $tableoptionvalues SET optionvalue_max = 23 , optionvalue_min = -23 WHERE option_id = 51");
- echo ' .';
- flush();
- // fix upload users description
- $wpdb->query("UPDATE $tableoptions SET option_description = '...or you may authorize only some users. enter their logins here, separated by spaces. if you leave this variable blank, all users who have the minimum level are authorized to upload. example: \'barbara anne george\'' WHERE option_id = 37");
- echo ' .';
- flush();
- // and file types
- $wpdb->query("UPDATE $tableoptions SET option_description = 'accepted file types, separated by spaces. example: \'jpg gif png\'' WHERE option_id = 34");
- echo ' .';
- flush();
- // add link to date format help page
- $wpdb->query("UPDATE $tableoptions SET option_description = 'see help for format characters' WHERE option_id = 52");
- $wpdb->query("UPDATE $tableoptions SET option_description = 'see help for format characters' WHERE option_id = 53");
- echo ' .';
- flush();
-?>
- Done.
-See, that didn’t hurt a bit. All done!
-
+