Ticket #15249: 15249.patch
File 15249.patch, 1.8 KB (added by , 14 years ago) |
---|
-
wp-includes/comment.php
321 321 $where .= $wpdb->prepare( ' AND comment_parent = %d', $parent ); 322 322 if ( '' !== $user_id ) 323 323 $where .= $wpdb->prepare( ' AND user_id = %d', $user_id ); 324 if ( '' !== $search ) 325 $where .= $this->get_search_sql( $search, array( 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_author_IP', 'comment_content' ) ); 324 if ( '' !== $search ) { 325 $search_columns = array( 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_author_IP', 'comment_content' ); 326 $search_sql = $this->get_search_sql( $search, $search_columns ); 327 $where .= apply_filters_ref_array( 'comment_search_sql', array($search_sql, &$this, $search_columns ) ); 328 } 326 329 327 330 $pieces = array( 'fields', 'join', 'where', 'orderby', 'order', 'limits' ); 328 331 $clauses = apply_filters_ref_array( 'comments_clauses', array( compact( $pieces ), &$this ) ); -
wp-includes/user.php
447 447 448 448 $search = trim( $qv['search'] ); 449 449 if ( $search ) { 450 $this->query_where .= $this->get_search_sql( $search, array( 'user_login', 'user_nicename', 'user_email', 'user_url', 'display_name' ) ); 450 $search_columns = array( 'user_login', 'user_nicename', 'user_email', 'user_url', 'display_name' ); 451 $search_sql = $this->get_search_sql( $search, $search_columns ); 452 $this->query_where .= apply_filters_ref_array( 'user_search_sql', array($search_sql, $search_columns ) ); 451 453 } 452 454 453 455 $this->parse_meta_query( $qv );