http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97933
Revision: 97933
Author: robin
Date: 2011-09-23 17:41:25 +0000 (Fri, 23 Sep 2011)
Log Message:
-----------
Use makeTitleSafe to create categories, otherwise it can create pages *not* in
the category namespace, if wgBabelMainCategory/wgBabelCategoryNames is
configured to e.g. "Project:User %code%"
Modified Paths:
--------------
trunk/extensions/Babel/BabelAutoCreate.class.php
Modified: trunk/extensions/Babel/BabelAutoCreate.class.php
===================================================================
--- trunk/extensions/Babel/BabelAutoCreate.class.php 2011-09-23 17:33:10 UTC
(rev 97932)
+++ trunk/extensions/Babel/BabelAutoCreate.class.php 2011-09-23 17:41:25 UTC
(rev 97933)
@@ -28,7 +28,7 @@
*/
public static function create( $category, $language, $level = null ) {
$category = strip_tags( $category );
- $title = Title::newFromText( $category, NS_CATEGORY );
+ $title = Title::makeTitleSafe( NS_CATEGORY, $category );
if ( $title === null || $title->exists() ) {
return;
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs