WordPress.org

Make WordPress Core

Changeset 23332


Ignore:
Timestamp:
01/22/2013 10:38:46 PM (8 years ago)
Author:
nacin
Message:

Comment Query: Use $this->query_vars instead of the nonexistent shorthand $q.

Merges [23325] to the 3.5 branch.
fixes #23208.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.5/wp-includes/comment.php

    r23330 r23332  
    291291            );
    292292            if ( ! empty( $this->query_vars['meta_key'] ) ) {
    293                 $allowed_keys[] = $q['meta_key'];
     293                $allowed_keys[] = $this->query_vars['meta_key'];
    294294                $allowed_keys[] = 'meta_value';
    295295                $allowed_keys[] = 'meta_value_num';
     
    297297            $ordersby = array_intersect( $ordersby, $allowed_keys );
    298298            foreach ( $ordersby as $key => $value ) {
    299                 if ( $value == $q['meta_key'] || $value == 'meta_value' ) {
     299                if ( $value == $this->query_vars['meta_key'] || $value == 'meta_value' ) {
    300300                    $ordersby[ $key ] = "$wpdb->commentmeta.meta_value";
    301301                } elseif ( $value == 'meta_value_num' ) {
Note: See TracChangeset for help on using the changeset viewer.