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:
parent
69c152cee7
commit
227a80eba3
|
@ -2411,7 +2411,7 @@ class WP_Query {
|
||||||
$cgroupby = "{$this->db->comments}.comment_id";
|
$cgroupby = "{$this->db->comments}.comment_id";
|
||||||
} else { // Other non singular e.g. front
|
} else { // Other non singular e.g. front
|
||||||
$cjoin = "JOIN {$this->db->posts} ON ( {$this->db->comments}.comment_post_ID = {$this->db->posts}.ID )";
|
$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 = '';
|
$cgroupby = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue