Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -266,6 +266,7 @@ |
267 | 267 | * (bug 34604) [mw.config] wgActionPaths should be an object instead of a numeral |
268 | 268 | array. |
269 | 269 | * (bug 29753) mw.util.tooltipAccessKeyPrefix should be alt-shift for Chrome on Windows |
| 270 | +* (bug 25095) Special:Categories doesn't show first relevant item when "from" is filled. |
270 | 271 | |
271 | 272 | === API changes in 1.19 === |
272 | 273 | * Made action=edit less likely to return "unknownerror", by returning the actual error |
Index: trunk/phase3/includes/specials/SpecialCategories.php |
— | — | @@ -59,12 +59,16 @@ |
60 | 60 | * @ingroup SpecialPage Pager |
61 | 61 | */ |
62 | 62 | class CategoryPager extends AlphabeticPager { |
| 63 | + private $conds = array( 'cat_pages > 0' ); |
| 64 | + |
63 | 65 | function __construct( IContextSource $context, $from ) { |
64 | 66 | parent::__construct( $context ); |
65 | 67 | $from = str_replace( ' ', '_', $from ); |
66 | 68 | if( $from !== '' ) { |
67 | 69 | $from = Title::capitalize( $from, NS_CATEGORY ); |
68 | | - $this->mOffset = $from; |
| 70 | + $dbr = wfGetDB( DB_SLAVE ); |
| 71 | + $this->conds[] = 'cat_title >= ' . $dbr->addQuotes( $from ); |
| 72 | + $this->setOffset( '' ); |
69 | 73 | } |
70 | 74 | } |
71 | 75 | |
— | — | @@ -72,7 +76,7 @@ |
73 | 77 | return array( |
74 | 78 | 'tables' => array( 'category' ), |
75 | 79 | 'fields' => array( 'cat_title','cat_pages' ), |
76 | | - 'conds' => array( 'cat_pages > 0' ), |
| 80 | + 'conds' => $this->conds, |
77 | 81 | 'options' => array( 'USE INDEX' => 'cat_title' ), |
78 | 82 | ); |
79 | 83 | } |