Make get_meta_sql() return associative array. See #15032

git-svn-id: https://develop.svn.wordpress.org/trunk@16053 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
scribu 2010-10-28 17:02:37 +00:00
parent 554cf6319b
commit 0ba17a703a
3 changed files with 7 additions and 7 deletions

View File

@ -156,7 +156,7 @@ class WP_Object_Query {
unset($meta_compare_string);
}
return array( $join, $where );
return compact( 'join', 'where' );
}
/*

View File

@ -2119,9 +2119,9 @@ class WP_Query extends WP_Object_Query {
}
if ( !empty( $q['meta_query'] ) ) {
list( $meta_join, $meta_where ) = $this->get_meta_sql( $q['meta_query'], $wpdb->posts, 'ID', $wpdb->postmeta, 'post_id' );
$join .= $meta_join;
$where .= $meta_where;
$clauses = $this->get_meta_sql( $q['meta_query'], $wpdb->posts, 'ID', $wpdb->postmeta, 'post_id' );
$join .= $clauses['join'];
$where .= $clauses['where'];
}
// Apply filters on where and join prior to paging so that any

View File

@ -468,9 +468,9 @@ class WP_User_Query extends WP_Object_Query {
}
if ( !empty( $qv['meta_query'] ) ) {
list( $meta_join, $meta_where ) = $this->get_meta_sql( $qv['meta_query'], $wpdb->users, 'ID', $wpdb->usermeta, 'user_id' );
$this->query_from .= $meta_join;
$this->query_where .= $meta_where;
$clauses = $this->get_meta_sql( $qv['meta_query'], $wpdb->users, 'ID', $wpdb->usermeta, 'user_id' );
$this->query_from .= $clauses['join'];
$this->query_where .= $clauses['where'];
}
if ( !empty( $qv['include'] ) ) {