[wp-cvs] wordpress/wp-admin post.php,1.114,1.115
Matthew Mullenweg
saxmatt at users.sourceforge.net
Sun Dec 19 08:17:09 UTC 2004
Update of /cvsroot/cafelog/wordpress/wp-admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23790/wp-admin
Modified Files:
post.php
Log Message:
http://mosquito.wordpress.org/view.php?id=568
Index: post.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/post.php,v
retrieving revision 1.114
retrieving revision 1.115
diff -C2 -d -r1.114 -r1.115
*** post.php 15 Dec 2004 23:09:45 -0000 1.114
--- post.php 19 Dec 2004 08:17:07 -0000 1.115
***************
*** 174,181 ****
$post = $post_ID = $p = (int) $_GET['post'];
! 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;
--- 174,180 ----
$post = $post_ID = $p = (int) $_GET['post'];
! 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;
***************
*** 197,200 ****
--- 196,202 ----
$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);
More information about the cvs
mailing list