X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialCategories.php;h=1232e3fa7530115ac67303f98627b18a0c7897de;hb=29cf2e21b25e0b3c66292082d5b88ca25b33857c;hp=338cd7066608bbf15428fefbaf17b3e4054a4e52;hpb=10e91851b2568267e5ccb7bbd0ab24ec4f2a195a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialCategories.php b/includes/specials/SpecialCategories.php index 338cd70666..1232e3fa75 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' ), ); }