Correct relation var and PHP4 constructor. See #15752

git-svn-id: https://develop.svn.wordpress.org/trunk@16850 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
scribu 2010-12-09 19:36:33 +00:00
parent 85a176fe8f
commit 77f5f54ff7
1 changed files with 3 additions and 3 deletions

View File

@ -535,7 +535,7 @@ class WP_Tax_Query {
var $relation = '';
var $queries = array();
function __construct( &$tax_query ) {
function WP_Tax_Query( &$tax_query ) {
if ( isset( $tax_query['relation'] ) && strtoupper( $tax_query['relation'] ) == 'OR' ) {
$this->relation = 'OR';
} else {
@ -599,7 +599,7 @@ class WP_Tax_Query {
if ( 'IN' == $operator ) {
if ( empty( $terms ) ) {
if ( 'OR' == $relation )
if ( 'OR' == $this->relation )
continue;
else
return array( 'join' => '', 'where' => ' AND 0 = 1' );
@ -633,7 +633,7 @@ class WP_Tax_Query {
}
if ( !empty( $where ) )
$where = ' AND ( ' . implode( " $relation ", $where ) . ' )';
$where = ' AND ( ' . implode( " $this->relation ", $where ) . ' )';
else
$where = '';