From a630eb7355ffede445eb910d9e92c0484145d211 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Tue, 14 Sep 2004 11:24:50 +0000 Subject: [PATCH] Make the posts page a bit friendlier. git-svn-id: http://svn.automattic.com/wordpress/trunk@1653 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit.php | 67 +++++++++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 28 deletions(-) diff --git a/wp-admin/edit.php b/wp-admin/edit.php index 3a92884e0..6814b51cc 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -6,10 +6,20 @@ $parent_file = 'edit.php'; require_once('admin-header.php'); get_currentuserinfo(); + $drafts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'draft' AND post_author = $user_ID"); -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) "); +} else { + $other_drafts = false; +} + +if ($drafts || $other_drafts) { +?> +
+

.

-
-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) { - ?> -
+

.

-
- -
+ + +
+ + +
+

' . $month[substr( $_GET['m'], 4, 2 )]." ".substr( $_GET['m'], 0, 4 )."

"; +if ( isset( $_GET['m'] ) ) { + echo $month[substr( $_GET['m'], 4, 2 )] . ' ' . substr( $_GET['m'], 0, 4 ); +} elseif ( isset( $_GET['s'] ) ) { + printf(__('Search for “%s”'), $_GET['s']); +} else { + _e('Last 15 Posts'); } ?> + -
+ +
+ + + +
+
+ +
- +
-
-
- - - -
-

@@ -108,7 +119,7 @@ if( isset( $_GET['m'] ) )