From d4e180f0750cf5f0bf524907ada8427d0b5ac744 Mon Sep 17 00:00:00 2001
From: saxmatt
Date: Tue, 14 Sep 2004 10:02:48 +0000
Subject: [PATCH] View other's drafts. Still need author editing on the
advanced edit form.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
---
wp-admin/edit.php | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/wp-admin/edit.php b/wp-admin/edit.php
index 86d121f01a..3a92884e0a 100644
--- a/wp-admin/edit.php
+++ b/wp-admin/edit.php
@@ -25,9 +25,33 @@ if ($drafts) {
?>
.
+
+
+if (1 < $user_level) {
+$editable = $wpdb->get_col("SELECT ID FROM $wpdb->users WHERE user_level <= '$user_level' AND ID != $user_ID");
+$editable = join($editable, ',');
+$other_drafts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'draft' AND post_author IN ($editable) ");
+if ($other_drafts) {
+ ?>
+
+
+ post_title = stripslashes($draft->post_title);
+ if ($draft->post_title == '')
+ $draft->post_title = sprintf(__('Post #%s'), $draft->ID);
+ echo "$draft->post_title";
+ ++$i;
+ }
+ ?>
+ .
+
+
+