jenkins-bot has submitted this change and it was merged. Change subject: SmartList: Fixed issue with whitspace on category filter ......................................................................
SmartList: Fixed issue with whitspace on category filter makeCategoriesFilterCondition: categorie names trimmed and whitespace replaced with underscore. patchset2: removing illegal category names Change-Id: Idbfcbbe4019ae29852b1beba2e236429a7c9bdf2 --- M SmartList/SmartList.class.php 1 file changed, 6 insertions(+), 3 deletions(-) Approvals: Tweichart: Looks good to me, approved jenkins-bot: Verified diff --git a/SmartList/SmartList.class.php b/SmartList/SmartList.class.php index 0390363..87bb173 100644 --- a/SmartList/SmartList.class.php +++ b/SmartList/SmartList.class.php @@ -803,7 +803,6 @@ } elseif( $aArgs['mode'] == 'whatlinkshere' ) { //PW(25.02.2015) TODO: //There could be filters - see Special:Whatlinkshere - $oTargetTitle = empty( $aArgs['target'] ) ? $this->getContext()->getTitle() : Title::newFromText( $aArgs['target'] ) @@ -1326,8 +1325,12 @@ $aCategories = explode( ',', $aArgs['categories'] ); $iCnt = count( $aCategories ); for ( $i = 0; $i < $iCnt; $i++ ) { - $aCategories[$i] = str_replace( ' ', '_', $aCategories[$i] ); - $aCategories[$i] = "'" . trim( ucfirst( $aCategories[$i] ) ) . "'"; + $oCategory = Category::newFromName( trim( $aCategories[$i] ) ); + if( $oCategory === false ) { + unset( $aCategories[$i] ); + continue; + } + $aCategories[$i] = "'" . $oCategory->getName() . "'" ; } $aArgs['categories'] = implode( ',', $aCategories ); -- To view, visit https://gerrit.wikimedia.org/r/236514 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idbfcbbe4019ae29852b1beba2e236429a7c9bdf2 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: REL1_23 Gerrit-Owner: Dvogel hallowelt <daniel.vo...@hallowelt.com> Gerrit-Reviewer: Mglaser <gla...@hallowelt.biz> Gerrit-Reviewer: Pwirth <wi...@hallowelt.biz> Gerrit-Reviewer: Robert Vogel <vo...@hallowelt.biz> Gerrit-Reviewer: Tweichart <weich...@hallowelt.biz> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits