Fix to showing too many posts when in days mode.

git-svn-id: https://develop.svn.wordpress.org/trunk@185 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mike Little 2003-06-07 17:21:08 +00:00
parent 8fb0aa37f6
commit a74f9ca065
1 changed files with 3 additions and 2 deletions

View File

@ -252,10 +252,10 @@ if ($pagenow != 'b2edit.php') {
gzip_compression();
}
}
$where .= ' AND post_status = "publish"';
$where .= ' AND (post_status = "publish"';
// Get private posts
if ('' != intval($user_ID)) $where .= " OR post_author = $user_ID AND post_status != 'draft'";
if ('' != intval($user_ID)) $where .= " OR post_author = $user_ID AND post_status != 'draft')"; else $where .= ')';
$request = " SELECT $distinct * FROM $tableposts WHERE 1=1".$where." ORDER BY post_$orderby $limits";
@ -268,6 +268,7 @@ if ($preview) {
}
}
//error_log("$request");
//echo $request;
$posts = $wpdb->get_results($request);
?>