From 8c3ec18a21e2f0297994d8112283cae9f7907f50 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 9 Jan 2012 20:08:57 +0000 Subject: [PATCH] Code cleanup in the paging block. Props kawauso. fixes #19773 git-svn-id: http://svn.automattic.com/wordpress/trunk@19724 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 90186cf24..bc6edea5a 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