Make WordPress Core

Changeset 16053


Ignore:
Timestamp:
10/28/2010 05:02:37 PM (13 years ago)
Author:
scribu
Message:

Make get_meta_sql() return associative array. See #15032

Location:
trunk/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class.wp-object-query.php

    r16052 r16053  
    157157        }
    158158
    159         return array( $join, $where );
     159        return compact( 'join', 'where' );
    160160    }
    161161
  • trunk/wp-includes/query.php

    r16018 r16053  
    21202120
    21212121        if ( !empty( $q['meta_query'] ) ) {
    2122             list( $meta_join, $meta_where ) = $this->get_meta_sql( $q['meta_query'], $wpdb->posts, 'ID', $wpdb->postmeta, 'post_id' );
    2123             $join .= $meta_join;
    2124             $where .= $meta_where;
     2122            $clauses = $this->get_meta_sql( $q['meta_query'], $wpdb->posts, 'ID', $wpdb->postmeta, 'post_id' );
     2123            $join .= $clauses['join'];
     2124            $where .= $clauses['where'];
    21252125        }
    21262126
  • trunk/wp-includes/user.php

    r16050 r16053  
    469469
    470470        if ( !empty( $qv['meta_query'] ) ) {
    471             list( $meta_join, $meta_where ) = $this->get_meta_sql( $qv['meta_query'], $wpdb->users, 'ID', $wpdb->usermeta, 'user_id' );
    472             $this->query_from .= $meta_join;
    473             $this->query_where .= $meta_where;
     471            $clauses = $this->get_meta_sql( $qv['meta_query'], $wpdb->users, 'ID', $wpdb->usermeta, 'user_id' );
     472            $this->query_from .= $clauses['join'];
     473            $this->query_where .= $clauses['where'];
    474474        }
    475475
Note: See TracChangeset for help on using the changeset viewer.