Only display published entries.
git-svn-id: https://develop.svn.wordpress.org/trunk@142 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
05ce9b7dd9
commit
e95f55e8a3
@ -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
Block a user