git-svn-id: http://svn.automattic.com/wordpress/trunk@1981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-12-19 08:17:07 +00:00
parent 1bd4057b23
commit 7b3972f45e
1 changed files with 5 additions and 3 deletions

View File

@ -173,10 +173,9 @@ case 'edit':
$post = $post_ID = $p = (int) $_GET['post'];
if (!user_can_edit_post($user_ID, $post_ID)) {
if ( !user_can_edit_post($user_ID, $post_ID) )
die ('You are not allowed to edit this post.');
}
$postdata = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID = '$post_ID'");
$content = $postdata->post_content;
$content = format_to_edit($content);
@ -196,6 +195,9 @@ case 'edit':
$post_parent = $postdata->post_parent;
$post_author = $postdata->post_author;
if( 'private' == $postdata->post_status && $postdata->post_author != $user_ID )
die ('You are not allowed to view other users\' private posts.');
if ($post_status == 'static') {
$page_template = get_post_meta($post_ID, '_wp_page_template', true);
include('edit-page-form.php');