Only display published entries.

git-svn-id: http://svn.automattic.com/wordpress/trunk@142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2003-06-01 14:49:04 +00:00
parent 183c6c718f
commit 96459f6958

View File

@ -46,7 +46,6 @@ $what_to_show = get_settings('what_to_show');
$archive_mode = get_settings('archive_mode');
$dateformat = stripslashes(get_settings('date_format'));
$timeformat = stripslashes(get_settings('time_format'));
$autobr = get_settings('AutoBR');
$time_difference = get_settings('time_difference');
/* First let's clear some variables */
@ -252,9 +251,13 @@ if ($pagenow != 'b2edit.php') {
gzip_compression();
}
}
$where .= ' AND post_status = "publish"';
// Get private posts
if ('' != intval($user_ID)) $where .= " OR post_author = $user_ID AND post_status != 'draft'";
$request = " SELECT $distinct * FROM $tableposts WHERE 1=1".$where." ORDER BY post_$orderby $limits";
if ($preview) {
$request = 'SELECT 1-1'; // dummy mysql query for the preview
// little funky fix for IEwin, rawk on that code