From 83f85c76ac502f6df618a9ba72049ec5a40ceaaf Mon Sep 17 00:00:00 2001 From: saxmatt Date: Fri, 11 Feb 2005 02:27:45 +0000 Subject: [PATCH] http://mosquito.wordpress.org/view.php?id=522 git-svn-id: http://svn.automattic.com/wordpress/trunk@2264 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-pages.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-admin/edit-pages.php b/wp-admin/edit-pages.php index bb2681e4d7..f68ddf2f4b 100644 --- a/wp-admin/edit-pages.php +++ b/wp-admin/edit-pages.php @@ -12,7 +12,12 @@ get_currentuserinfo(); get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'static' AND post_author = $user_ID"); + $posts = $wpdb->get_results(" + SELECT $wpdb->posts.*, $wpdb->users.user_level FROM $wpdb->posts + INNER JOIN $wpdb->users ON ($wpdb->posts.post_author = $wpdb->users.ID) + WHERE $wpdb->posts.post_status = 'static' + AND ($wpdb->users.user_level < $user_level OR $wpdb->posts.post_author = $user_ID) + "); } else { $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'static'"); }