mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
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
This commit is contained in:
parent
c89dde17f4
commit
4f9744cb80
@ -252,10 +252,10 @@ if ($pagenow != 'b2edit.php') {
|
|||||||
gzip_compression();
|
gzip_compression();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$where .= ' AND post_status = "publish"';
|
$where .= ' AND (post_status = "publish"';
|
||||||
|
|
||||||
// Get private posts
|
// 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";
|
$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;
|
//echo $request;
|
||||||
$posts = $wpdb->get_results($request);
|
$posts = $wpdb->get_results($request);
|
||||||
?>
|
?>
|
Loading…
x
Reference in New Issue
Block a user