Correct relation var and PHP4 constructor. See #15752

git-svn-id: http://svn.automattic.com/wordpress/trunk@16850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
scribu 2010-12-09 19:36:33 +00:00
parent e5690e7ebe
commit 6f9d098c9b
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 = '';