From 4f9744cb806743ea2a2011ba2696be96513800ab Mon Sep 17 00:00:00 2001 From: mikelittle Date: Sat, 7 Jun 2003 17:21:08 +0000 Subject: [PATCH] Fix to showing too many posts when in days mode. git-svn-id: http://svn.automattic.com/wordpress/trunk@185 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- blog.header.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/blog.header.php b/blog.header.php index 0583e55095..3cf7ffcd45 100644 --- a/blog.header.php +++ b/blog.header.php @@ -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); ?> \ No newline at end of file