* (bug 5284) Special redirect pages should remember parameters
* Suppress 7za output on dumpBackup
* (bug 5338) Reject extra initial colons in title
- (bug 5487) Escape self-closed HTML pair tags.
+* (bug 5487) Escape self-closed HTML pair tags
+* Add "raw suffix" magic word for some magic words, e.g. {{NUMBEROFUSERS|R}} will
+ produce a count minus formatting
== Compatibility ==
'MAG_SUBJECTPAGENAME',
'MAG_SUBJECTPAGENAMEE',
'MAG_NUMBEROFUSERS',
+ 'MAG_RAWSUFFIX',
);
if ( ! defined( 'MEDIAWIKI_INSTALL' ) )
wfRunHooks( 'MagicWordMagicWords', array( &$magicWords ) );
MAG_SUBJECTPAGENAME,
MAG_SUBJECTPAGENAMEE,
MAG_NUMBEROFUSERS,
+ MAG_RAWSUFFIX,
);
if ( ! defined( 'MEDIAWIKI_INSTALL' ) )
wfRunHooks( 'MagicWordwgVariableIDs', array( &$wgVariableIDs ) );
}
}
+ # NUMBEROFUSERS, NUMBEROFARTICLES, and NUMBEROFFILES
+ if( !$found ) {
+ $mwWordsToCheck = array( MAG_NUMBEROFUSERS => 'wfNumberOfUsers', MAG_NUMBEROFARTICLES => 'wfNumberOfArticles', MAG_NUMBEROFFILES => 'wfNumberOfFiles' );
+ foreach( $mwWordsToCheck as $word => $func ) {
+ $mwCurrentWord =& MagicWord::get( $word );
+ if( $mwCurrentWord->matchStartAndRemove( $part1 ) ) {
+ $mwRawSuffix =& MagicWord::get( MAG_RAWSUFFIX );
+ if( $mwRawSuffix->match( $args[0] ) ) {
+ # Raw and unformatted
+ $text = $linestart . call_user_func( $func );
+ } else {
+ # Formatted according to the content default
+ $text = $linestart . $wgContLang->formatNum( call_user_func( $func ) );
+ }
+ $found = true;
+ }
+ }
+ }
+
+ /*$mwNumUsers =& MagicWord::get( MAG_NUMBEROFUSERS );
+ if( $mwNumUsers->matchStartAndRemove( $part1 ) ) {
+ $mwRawSuffix =& MagicWord::get( MAG_RAWSUFFIX );
+ if( $mwRawSuffix->match( $args[0] ) ) {
+ # Raw and unformatted
+ $text = $linestart . wfNumberOfUsers();
+ } else {
+ # Default; formatted form
+ $text = $linestart . $wgContLang->formatNum( wfNumberOfUsers() );
+ }
+ $found = true;
+ }
+ }*/
+
# Extensions
if ( !$found && substr( $part1, 0, 1 ) == '#' ) {
$colonPos = strpos( $part1, ':' );
MAG_UC => array( 0, 'UC:' ),
MAG_RAW => array( 0, 'RAW:' ),
MAG_DISPLAYTITLE => array( 1, 'DISPLAYTITLE' ),
+ MAG_RAWSUFFIX => array( 1, 'R' ),
);
if (!$wgCachedMessageArrays) {