Merge "Really fix CategoryWidget checks for redirects to hidden categories this time"

This commit is contained in:
jenkins-bot 2014-09-24 22:50:32 +00:00 committed by Gerrit Code Review
commit 5dcd099862

View file

@ -263,8 +263,7 @@ ve.ui.MWCategoryWidget.prototype.addItems = function ( items, index ) {
// Create a widget using the item data
config = {
$: categoryWidget.$,
item: item,
hidden: ve.init.platform.linkCache.getCached( item.name ).hidden
item: item
};
if ( Object.prototype.hasOwnProperty.call( categoryWidget.categoryRedirects, itemTitle ) ) {
config.redirectTo = new mw.Title(
@ -272,6 +271,8 @@ ve.ui.MWCategoryWidget.prototype.addItems = function ( items, index ) {
mw.config.get( 'wgNamespaceIds' ).category
).getMainText();
config.hidden = ve.init.platform.linkCache.getCached( categoryWidget.categoryRedirects[itemTitle] ).hidden;
} else {
config.hidden = ve.init.platform.linkCache.getCached( item.name ).hidden;
}
categoryItem = new ve.ui.MWCategoryItemWidget( config );
categoryItem.connect( categoryWidget, {