Ticket #3091: link-template.php.diff
| File link-template.php.diff, 679 bytes (added by , 19 years ago) |
|---|
-
wp-includes/link-template.php
482 482 if ( 'posts' == get_query_var('what_to_show') ) { 483 483 preg_match('#FROM\s(.*)\sORDER BY#siU', $wp_query->request, $matches); 484 484 $fromwhere = $matches[1]; 485 $numposts = $wpdb->get_var("SELECT COUNT(DISTINCT ID) FROM $fromwhere");485 $numposts = $wpdb->get_var("SELECT COUNT(DISTINCT $wpdb->posts.ID) FROM $fromwhere"); 486 486 $max_num_pages = ceil($numposts / $posts_per); 487 487 } else { 488 488 preg_match('#FROM\s(.*)\sORDER BY#siU', $wp_query->request, $matches);