diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-10-12 16:21:15 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-10-12 16:21:15 +0000 |
| commit | 3a4570b0fc8b3d6339bef71d17d7701554e0bbf7 (patch) | |
| tree | 2a06e5261263c68d8afd95a6328879dc289cb909 /wp-admin/post.php | |
| parent | b83c34a7010faee0223f6037025c350da12e05e6 (diff) | |
| download | wordpress-mu-3a4570b0fc8b3d6339bef71d17d7701554e0bbf7.tar.gz wordpress-mu-3a4570b0fc8b3d6339bef71d17d7701554e0bbf7.tar.xz wordpress-mu-3a4570b0fc8b3d6339bef71d17d7701554e0bbf7.zip | |
Merge with WP 2.3 - testing use only!
Move pluggable functions out of wpmu-functions and into pluggable.php, fixes #439
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1069 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/post.php')
| -rw-r--r-- | wp-admin/post.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/wp-admin/post.php b/wp-admin/post.php index 3006773..680f8ab 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -38,6 +38,9 @@ case 'post': if ( isset($_POST['save']) ) $location = "post.php?action=edit&post=$post_ID"; + if ( empty($post_ID) ) + $location = 'post-new.php'; + wp_redirect($location); exit(); break; @@ -48,6 +51,8 @@ case 'edit': $post_ID = $p = (int) $_GET['post']; $post = get_post($post_ID); + if ( empty($post->ID) ) wp_die( __("You attempted to edit a post that doesn't exist. Perhaps it was deleted?") ); + if ( 'page' == $post->post_type ) { wp_redirect("page.php?action=edit&post=$post_ID"); exit(); @@ -149,7 +154,7 @@ case 'delete': if ( ! wp_delete_attachment($post_id) ) wp_die( __('Error in deleting...') ); } else { - if ( !wp_delete_post($post_id) ) + if ( !wp_delete_post($post_id) ) wp_die( __('Error in deleting...') ); } |
