Index: trunk/phase3/includes/parser/CoreParserFunctions.php |
— | — | @@ -16,6 +16,7 @@ |
17 | 17 | |
18 | 18 | $parser->setFunctionHook( 'int', array( __CLASS__, 'intFunction' ), SFH_NO_HASH ); |
19 | 19 | $parser->setFunctionHook( 'ns', array( __CLASS__, 'ns' ), SFH_NO_HASH ); |
| 20 | + $parser->setFunctionHook( 'nse', array( __CLASS__, 'nse' ), SFH_NO_HASH ); |
20 | 21 | $parser->setFunctionHook( 'urlencode', array( __CLASS__, 'urlencode' ), SFH_NO_HASH ); |
21 | 22 | $parser->setFunctionHook( 'lcfirst', array( __CLASS__, 'lcfirst' ), SFH_NO_HASH ); |
22 | 23 | $parser->setFunctionHook( 'ucfirst', array( __CLASS__, 'ucfirst' ), SFH_NO_HASH ); |
— | — | @@ -118,6 +119,10 @@ |
119 | 120 | return array( 'found' => false ); |
120 | 121 | } |
121 | 122 | } |
| 123 | + |
| 124 | + static function nse( $parser, $part1 = '' ) { |
| 125 | + return wfUrlencode( str_replace( ' ', '_', self::ns( $parser, $part1 ) ) ); |
| 126 | + } |
122 | 127 | |
123 | 128 | static function urlencode( $parser, $s = '' ) { |
124 | 129 | return urlencode( $s ); |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -291,6 +291,7 @@ |
292 | 292 | 'int' => array( 0, 'INT:' ), |
293 | 293 | 'sitename' => array( 1, 'SITENAME' ), |
294 | 294 | 'ns' => array( 0, 'NS:' ), |
| 295 | + 'nse' => array( 0, 'NSE:' ), |
295 | 296 | 'localurl' => array( 0, 'LOCALURL:' ), |
296 | 297 | 'localurle' => array( 0, 'LOCALURLE:' ), |
297 | 298 | 'server' => array( 0, 'SERVER' ), |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -174,6 +174,8 @@ |
175 | 175 | * (bug 20014) Added CSS class "mw-listgrouprights-right-name" is wrapped on the |
176 | 176 | right name in Special:ListGroupRights |
177 | 177 | * The description message in $wgExtensionCredits can be an array with parameters |
| 178 | +* (bug 12920) New CoreParserFunction {{nse:...}} as an url-friendly equivalent |
| 179 | + to {{ns:...}} |
178 | 180 | |
179 | 181 | === Bug fixes in 1.16 === |
180 | 182 | |
— | — | @@ -366,7 +368,6 @@ |
367 | 369 | * (bug 17395) Remote file descriptions use user language ($wgLang), not wiki |
368 | 370 | language ($wgContLang) |
369 | 371 | |
370 | | - |
371 | 372 | == API changes in 1.16 == |
372 | 373 | |
373 | 374 | * Added uiprop=changeablegroups to meta=userinfo |