Query: Use AND in a SQL query rather than &&.

This appears to have been the only instance of `&&` being used in SQL, so for consistency lets remove it.

Props scrappy@hub.org.
Fixes #37903.

Built from https://develop.svn.wordpress.org/trunk@38491


git-svn-id: http://core.svn.wordpress.org/trunk@38432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2016-09-01 05:11:31 +00:00
parent 69c152cee7
commit 227a80eba3
2 changed files with 2 additions and 2 deletions

View File

@ -2411,7 +2411,7 @@ class WP_Query {
$cgroupby = "{$this->db->comments}.comment_id";
} else { // Other non singular e.g. front
$cjoin = "JOIN {$this->db->posts} ON ( {$this->db->comments}.comment_post_ID = {$this->db->posts}.ID )";
$cwhere = "WHERE ( post_status = 'publish' OR ( post_status = 'inherit' && post_type = 'attachment' ) ) AND comment_approved = '1'";
$cwhere = "WHERE ( post_status = 'publish' OR ( post_status = 'inherit' AND post_type = 'attachment' ) ) AND comment_approved = '1'";
$cgroupby = '';
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38490';
$wp_version = '4.7-alpha-38491';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.