Drafts clean up.

git-svn-id: https://develop.svn.wordpress.org/trunk@2701 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2005-07-08 22:59:15 +00:00
parent 537b91b582
commit 5bd6027fbd
8 changed files with 62 additions and 52 deletions

View File

@@ -9,18 +9,8 @@ $_GET['m'] = (int) $_GET['m'];
get_currentuserinfo();
$drafts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'draft' AND post_author = $user_ID");
if (1 < $user_level) {
$editable = $wpdb->get_col("SELECT ID FROM $wpdb->users WHERE user_level <= '$user_level' AND ID != $user_ID");
if( is_array( $editable ) == false )
$other_drafts = '';
else {
$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;
}
$drafts = get_users_drafts( $user_ID );
$other_drafts = get_others_drafts( $user_ID);
if ($drafts || $other_drafts) {
?>