diff --git a/blog.header.php b/blog.header.php index 810dbc73c9..3f8fc61c20 100644 --- a/blog.header.php +++ b/blog.header.php @@ -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