Changeset 15887
- Timestamp:
- 10/21/2010 02:03:25 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/default-list-tables.php
r15882 r15887 2094 2094 $search = ( isset( $_REQUEST['s'] ) ) ? $_REQUEST['s'] : ''; 2095 2095 2096 $user_id = ( isset( $_REQUEST['user_id'] ) ) ? $_REQUEST['user_id'] : ''; 2097 2096 2098 $comments_per_page = $this->get_items_per_page( 'edit_comments_per_page' ); 2097 2099 $comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status ); … … 2114 2116 'status' => isset( $status_map[$comment_status] ) ? $status_map[$comment_status] : $comment_status, 2115 2117 'search' => $search, 2118 'user_id' => $user_id, 2116 2119 'offset' => $start, 2117 2120 'number' => $number, -
trunk/wp-includes/query.php
r15874 r15887 1186 1186 , 's' 1187 1187 , 'sentence' 1188 , 'fields' 1188 1189 ); 1189 1190 1190 1191 foreach ( $keys as $key ) { 1191 if ( !isset($array[$key]) )1192 if ( !isset($array[$key]) ) 1192 1193 $array[$key] = ''; 1193 1194 } … … 1197 1198 1198 1199 foreach ( $array_keys as $key ) { 1199 if ( !isset($array[$key]) )1200 if ( !isset($array[$key]) ) 1200 1201 $array[$key] = array(); 1201 1202 } … … 1649 1650 $search = ''; 1650 1651 $groupby = ''; 1651 $fields = "$wpdb->posts.*";1652 $fields = ''; 1652 1653 $post_status_join = false; 1653 1654 $page = 1; … … 1729 1730 else 1730 1731 $q['no_found_rows'] = false; 1732 1733 switch ( $q['fields'] ) { 1734 case 'ids': 1735 $fields = "$wpdb->posts.ID"; 1736 break; 1737 case 'id=>parent': 1738 $fields = "$wpdb->posts.ID, $wpdb->posts.post_parent"; 1739 break; 1740 default: 1741 $fields = "$wpdb->posts.*"; 1742 } 1731 1743 1732 1744 // If a month is specified in the querystring, load that month … … 2273 2285 if ( !empty( $orderby ) ) 2274 2286 $orderby = 'ORDER BY ' . $orderby; 2287 2275 2288 $found_rows = ''; 2276 2289 if ( !$q['no_found_rows'] && !empty($limits) ) … … 2281 2294 $this->request = apply_filters_ref_array('posts_request', array( $this->request, &$this ) ); 2282 2295 2296 if ( 'ids' == $q['fields'] ) { 2297 $this->posts = $wpdb->get_col($this->request); 2298 2299 return $this->posts; 2300 } 2301 2302 if ( 'id=>parent' == $q['fields'] ) { 2303 $this->posts = $wpdb->get_results($this->request); 2304 2305 $r = array(); 2306 foreach ( $this->posts as $post ) 2307 $r[ $post->ID ] = $post->post_parent; 2308 2309 return $r; 2310 } 2311 2283 2312 $this->posts = $wpdb->get_results($this->request); 2313 2284 2314 // Raw results filter. Prior to status checks. 2285 2315 if ( !$q['suppress_filters'] )
Note: See TracChangeset
for help on using the changeset viewer.