mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-10 12:50:18 +01:00
Quote strings in SQL with single quotes instead of double quotes to be more correct and consistent. Props WillemGrooters. fixes #3367
git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
440297d7a8
commit
d0cc33e98e
@ -598,13 +598,13 @@ class WP_Query {
|
||||
}
|
||||
|
||||
if ( $this->is_attachment ) {
|
||||
$where .= ' AND (post_status = "attachment")';
|
||||
$where .= " AND (post_status = 'attachment')";
|
||||
} elseif ($this->is_page) {
|
||||
$where .= ' AND (post_status = "static")';
|
||||
$where .= " AND (post_status = 'static')";
|
||||
} elseif ($this->is_single) {
|
||||
$where .= ' AND (post_status != "static")';
|
||||
$where .= " AND (post_status != 'static')";
|
||||
} else {
|
||||
$where .= ' AND (post_status = "publish"';
|
||||
$where .= " AND (post_status = 'publish'";
|
||||
|
||||
if (isset($user_ID) && ('' != intval($user_ID)))
|
||||
$where .= " OR post_author = $user_ID AND post_status != 'draft' AND post_status != 'static')";
|
||||
@ -613,7 +613,7 @@ class WP_Query {
|
||||
}
|
||||
|
||||
if (! $this->is_attachment )
|
||||
$where .= ' AND post_status != "attachment"';
|
||||
$where .= " AND post_status != 'attachment'";
|
||||
|
||||
// Apply filters on where and join prior to paging so that any
|
||||
// manipulations to them are reflected in the paging by day queries.
|
||||
|
Loading…
Reference in New Issue
Block a user