Changeset 13647
- Timestamp:
- 03/10/2010 06:37:03 PM (13 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/link-template.php
r13635 r13647 1159 1159 $order = $start ? 'ASC' : 'DESC'; 1160 1160 1161 return get_posts( array('numberposts' => 1, ' order' => $order, 'orderby' => 'ID', 'category' => $categories) );1161 return get_posts( array('numberposts' => 1, 'no_found_rows' => true, 'order' => $order, 'orderby' => 'ID', 'category' => $categories) ); 1162 1162 } 1163 1163 -
trunk/wp-includes/query.php
r13615 r13647 1673 1673 } 1674 1674 1675 // If true, forcibly turns off SQL_CALC_FOUND_ROWS even when limits are present. 1676 if ( isset($q['no_found_rows']) ) 1677 $q['no_found_rows'] = (bool) $q['no_found_rows']; 1678 else 1679 $q['no_found_rows'] = false; 1680 1675 1681 // If a month is specified in the querystring, load that month 1676 1682 if ( $q['m'] ) { … … 2332 2338 $orderby = 'ORDER BY ' . $orderby; 2333 2339 $found_rows = ''; 2334 if ( ! empty($limits) )2340 if ( !$q['no_found_rows'] && !empty($limits) ) 2335 2341 $found_rows = 'SQL_CALC_FOUND_ROWS'; 2336 2342 … … 2357 2363 } 2358 2364 2359 if ( ! empty($limits) ) {2365 if ( !$q['no_found_rows'] && !empty($limits) ) { 2360 2366 $found_posts_query = apply_filters( 'found_posts_query', 'SELECT FOUND_ROWS()' ); 2361 2367 $this->found_posts = $wpdb->get_var( $found_posts_query );
Note: See TracChangeset
for help on using the changeset viewer.