added enabled field so you can disable the cache thing if you need to before its...
[lhc/web/wiklou.git] / includes / specials / SpecialCategories.php
index 6d2831c..338cd70 100644 (file)
@@ -59,12 +59,16 @@ 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 );
-                       $this->mOffset = $from;
+                       $dbr = wfGetDB( DB_SLAVE );
+                       $this->conds[] = 'cat_title >= ' . $dbr->addQuotes( $from );
+                       $this->setOffset( '' );
                }
        }
 
@@ -72,7 +76,7 @@ class CategoryPager extends AlphabeticPager {
                return array(
                        'tables' => array( 'category' ),
                        'fields' => array( 'cat_title','cat_pages' ),
-                       'conds' => array( 'cat_pages > 0' ),
+                       'conds' => $this->conds,
                        'options' => array( 'USE INDEX' => 'cat_title' ),
                );
        }