WordPress.org

Make WordPress Core

Ticket #16825: mypatch.diff

File mypatch.diff, 1.7 KB (added by Rahe, 7 years ago)

Speedy fix

  • Users/beapi/SVN/WPTrunk/trunk/wp-includes/meta.php

     
    368368 *              Possible values: 'NUMERIC', 'BINARY', 'CHAR', 'DATE', 'DATETIME', 'DECIMAL', 'SIGNED', 'TIME', 'UNSIGNED'.
    369369 *              Default: 'CHAR'
    370370 *
    371  * @param string $meta_type
     371 * @param string $table_meta_type
    372372 * @param string $primary_table
    373373 * @param string $primary_id_column
    374374 * @param object $context (optional) The main query object
    375375 * @return array( 'join' => $join_sql, 'where' => $where_sql )
    376376 */
    377 function _get_meta_sql( $meta_query, $meta_type, $primary_table, $primary_id_column, $context = null ) {
     377function _get_meta_sql( $meta_query, $table_meta_type, $primary_table, $primary_id_column, $context = null ) {
    378378        global $wpdb;
    379379
    380         if ( ! $meta_table = _get_meta_table( $meta_type ) )
     380        if ( ! $table_meta_type = _get_meta_table( $table_meta_type ) )
    381381                return false;
    382382
    383         $meta_id_column = esc_sql( $meta_type . '_id' );
     383        $meta_id_column = esc_sql( $table_meta_type . '_id' );
    384384
    385385        $join = '';
    386386        $where = '';
     
    442442                $where .= $wpdb->prepare( " AND CAST($alias.meta_value AS {$meta_type}) {$meta_compare} {$meta_compare_string}", $meta_value );
    443443        }
    444444
    445         return apply_filters_ref_array( 'get_meta_sql', array( compact( 'join', 'where' ), $meta_query, $meta_type, $primary_table, $primary_id_column, &$context ) );
     445        return apply_filters_ref_array( 'get_meta_sql', array( compact( 'join', 'where' ), $meta_query, $table_meta_type, $primary_table, $primary_id_column, &$context ) );
    446446}
    447447
    448448/**