Only display published entries.
git-svn-id: http://svn.automattic.com/wordpress/trunk@142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
183c6c718f
commit
96459f6958
|
@ -46,7 +46,6 @@ $what_to_show = get_settings('what_to_show');
|
||||||
$archive_mode = get_settings('archive_mode');
|
$archive_mode = get_settings('archive_mode');
|
||||||
$dateformat = stripslashes(get_settings('date_format'));
|
$dateformat = stripslashes(get_settings('date_format'));
|
||||||
$timeformat = stripslashes(get_settings('time_format'));
|
$timeformat = stripslashes(get_settings('time_format'));
|
||||||
$autobr = get_settings('AutoBR');
|
|
||||||
$time_difference = get_settings('time_difference');
|
$time_difference = get_settings('time_difference');
|
||||||
|
|
||||||
/* First let's clear some variables */
|
/* First let's clear some variables */
|
||||||
|
@ -252,9 +251,13 @@ if ($pagenow != 'b2edit.php') {
|
||||||
gzip_compression();
|
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";
|
$request = " SELECT $distinct * FROM $tableposts WHERE 1=1".$where." ORDER BY post_$orderby $limits";
|
||||||
|
|
||||||
|
|
||||||
if ($preview) {
|
if ($preview) {
|
||||||
$request = 'SELECT 1-1'; // dummy mysql query for the preview
|
$request = 'SELECT 1-1'; // dummy mysql query for the preview
|
||||||
// little funky fix for IEwin, rawk on that code
|
// little funky fix for IEwin, rawk on that code
|
||||||
|
|
Loading…
Reference in New Issue