Merge "Remove a bunch of trailing spaces and unneeded newlines"
[lhc/web/wiklou.git] / includes / specials / SpecialCategories.php
index 338cd70..1232e3f 100644 (file)
@@ -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' ),
                );
        }