diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-09-26 15:45:20 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-09-26 15:45:20 +0000 |
commit | 28781ebb081ab8d99b30a33f5cd911b3b050bcc9 (patch) | |
tree | f21e6b7d3dd06002c58dd52ae2eae10d64d62d85 /wp-includes/link-template.php | |
parent | cbd939114d362bfece3839d7d5d5e07367fd6be8 (diff) | |
download | wordpress-mu-28781ebb081ab8d99b30a33f5cd911b3b050bcc9.tar.gz wordpress-mu-28781ebb081ab8d99b30a33f5cd911b3b050bcc9.tar.xz wordpress-mu-28781ebb081ab8d99b30a33f5cd911b3b050bcc9.zip |
WP Merge to rev 4254
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@770 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/link-template.php')
-rw-r--r-- | wp-includes/link-template.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 965c4e4..78e789f 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -482,7 +482,7 @@ function _max_num_pages() { if ( 'posts' == get_query_var('what_to_show') ) { preg_match('#FROM\s(.*)\sORDER BY#siU', $wp_query->request, $matches); $fromwhere = $matches[1]; - $numposts = $wpdb->get_var("SELECT COUNT(DISTINCT ID) FROM $fromwhere"); + $numposts = $wpdb->get_var("SELECT COUNT(DISTINCT $wpdb->posts.ID) FROM $fromwhere"); $max_num_pages = ceil($numposts / $posts_per); } else { preg_match('#FROM\s(.*)\sORDER BY#siU', $wp_query->request, $matches); |