r97584 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97583‎ | r97584 | r97585 >
Date:00:21, 20 September 2011
Author:bawolff
Status:ok
Tags:
Comment:
Make titles given to it in the category parameter force being in category namespace, even if you give something like project:Foo

Reported on http://www.mediawiki.org/wiki/Thread:Extension_talk:DynamicPageList_(Wikimedia)/Bug:_Colon_in_category_name_returns_no_results or sort of anyways (Couldn't reproduce actual issue, but this was as close as I could get).
Modified paths:
  • /trunk/extensions/intersection/DynamicPageList.php (modified) (history)

Diff [purge]

Index: trunk/extensions/intersection/DynamicPageList.php
@@ -133,7 +133,8 @@
134134 $arg = trim( $paramField[1] );
135135 switch ( $type ) {
136136 case 'category':
137 - $title = Title::newFromText(
 137+ $title = Title::makeTitleSafe(
 138+ NS_CATEGORY,
138139 $parser->transformMsg( $arg, $poptions )
139140 );
140141 if( is_null( $title ) ) {
@@ -142,7 +143,8 @@
143144 $categories[] = $title;
144145 break;
145146 case 'notcategory':
146 - $title = Title::newFromText(
 147+ $title = Title::makeTitleSafe(
 148+ NS_CATEGORY,
147149 $parser->transformMsg( $arg, $poptions )
148150 );
149151 if( is_null( $title ) ) {

Status & tagging log