From dc3bccda2083aa9f1ab938ea6dd135b0116eab61 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 9 Jan 2012 20:08:57 +0000 Subject: [PATCH] Code cleanup in the paging block. Props kawauso. fixes #19773 git-svn-id: https://develop.svn.wordpress.org/trunk@19724 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/query.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 90186cf24e..bc6edea5ac 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2509,18 +2509,16 @@ class WP_Query { // Paging if ( empty($q['nopaging']) && !$this->is_singular ) { $page = absint($q['paged']); - if ( empty($page) ) + if ( !$page ) $page = 1; if ( empty($q['offset']) ) { - $pgstrt = ''; $pgstrt = ($page - 1) * $q['posts_per_page'] . ', '; - $limits = 'LIMIT ' . $pgstrt . $q['posts_per_page']; } else { // we're ignoring $page and using 'offset' $q['offset'] = absint($q['offset']); $pgstrt = $q['offset'] . ', '; - $limits = 'LIMIT ' . $pgstrt . $q['posts_per_page']; } + $limits = 'LIMIT ' . $pgstrt . $q['posts_per_page']; } // Comments feeds