From 89f8334d585e057b43ffc0b79f0808247a52fbb5 Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Wed, 24 Sep 2014 23:18:09 +0100 Subject: [PATCH] Really fix CategoryWidget checks for redirects to hidden categories this time Previous commit dealt with only part of a related problem. Change-Id: Iffe319d5b6d1a5ea91acca26a9613e07bea0d8fe --- modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js index fba4a4a41e..f384e3eb54 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js @@ -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, {