summaryrefslogtreecommitdiffstats
path: root/wp-admin
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-01-22 11:44:06 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-01-22 11:44:06 +0000
commitb2f9804dae80c5f6c70c70e92a3bbde67e2615c5 (patch)
tree7615f215a90e4c797702547dab832d30887a0a54 /wp-admin
parent4e71faf4fa1a98517df1c83be342dd3714f504d2 (diff)
downloadwordpress-mu-b2f9804dae80c5f6c70c70e92a3bbde67e2615c5.tar.gz
wordpress-mu-b2f9804dae80c5f6c70c70e92a3bbde67e2615c5.tar.xz
wordpress-mu-b2f9804dae80c5f6c70c70e92a3bbde67e2615c5.zip
WP Merge to 4780
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@854 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin')
-rw-r--r--wp-admin/page.php8
-rw-r--r--wp-admin/post.php6
-rw-r--r--wp-admin/upgrade-functions.php4
3 files changed, 14 insertions, 4 deletions
diff --git a/wp-admin/page.php b/wp-admin/page.php
index acffa30..4cad302 100644
--- a/wp-admin/page.php
+++ b/wp-admin/page.php
@@ -45,10 +45,12 @@ case 'edit':
$editing = true;
$page_ID = $post_ID = $p = (int) $_GET['post'];
$post = get_post_to_edit($page_ID);
- if( $post->post_type == 'post' ) {
- header( "Location: " . str_replace( "page.php", "post.php", $_SERVER[ 'REQUEST_URI' ] ) );
- die();
+
+ if ( 'post' == $post->post_type ) {
+ wp_redirect("post.php?action=edit&post=$post_ID");
+ exit();
}
+
if($post->post_status == 'draft') {
wp_enqueue_script('prototype');
wp_enqueue_script('autosave');
diff --git a/wp-admin/post.php b/wp-admin/post.php
index dd756fb..8f0cc53 100644
--- a/wp-admin/post.php
+++ b/wp-admin/post.php
@@ -47,6 +47,12 @@ case 'edit':
$editing = true;
$post_ID = $p = (int) $_GET['post'];
$post = get_post($post_ID);
+
+ if ( 'page' == $post->post_type ) {
+ wp_redirect("page.php?action=edit&post=$post_ID");
+ exit();
+ }
+
if($post->post_status == 'draft') {
wp_enqueue_script('prototype');
wp_enqueue_script('autosave');
diff --git a/wp-admin/upgrade-functions.php b/wp-admin/upgrade-functions.php
index 001a07e..e0c347c 100644
--- a/wp-admin/upgrade-functions.php
+++ b/wp-admin/upgrade-functions.php
@@ -174,7 +174,7 @@ function upgrade_all() {
if ( $wp_current_db_version < 3308 )
upgrade_160();
- if ( $wp_current_db_version < 3845 )
+ if ( $wp_current_db_version < 4772 )
upgrade_210();
if ( $wp_current_db_version < 4351 )
@@ -561,7 +561,9 @@ function upgrade_210() {
$wpdb->query("UPDATE $wpdb->categories SET link_count = '$count' WHERE cat_ID = '$cat_id'");
}
}
+ }
+ if ( $wp_current_db_version < 4772 ) {
// Obsolete linkcategories table
$wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'linkcategories');
}