summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialCategories.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/specials/SpecialCategories.php')
-rw-r--r--includes/specials/SpecialCategories.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/includes/specials/SpecialCategories.php b/includes/specials/SpecialCategories.php
index 338cd706..1232e3fa 100644
--- a/includes/specials/SpecialCategories.php
+++ b/includes/specials/SpecialCategories.php
@@ -59,16 +59,13 @@ class SpecialCategories extends SpecialPage {
* @ingroup SpecialPage Pager
*/
class CategoryPager extends AlphabeticPager {
- private $conds = array( 'cat_pages > 0' );
-
function __construct( IContextSource $context, $from ) {
parent::__construct( $context );
$from = str_replace( ' ', '_', $from );
if( $from !== '' ) {
$from = Title::capitalize( $from, NS_CATEGORY );
- $dbr = wfGetDB( DB_SLAVE );
- $this->conds[] = 'cat_title >= ' . $dbr->addQuotes( $from );
- $this->setOffset( '' );
+ $this->setOffset( $from );
+ $this->setIncludeOffset( true );
}
}
@@ -76,7 +73,7 @@ class CategoryPager extends AlphabeticPager {
return array(
'tables' => array( 'category' ),
'fields' => array( 'cat_title','cat_pages' ),
- 'conds' => $this->conds,
+ 'conds' => array( 'cat_pages > 0' ),
'options' => array( 'USE INDEX' => 'cat_title' ),
);
}