From: Ævar Arnfjörð Bjarmason Date: Sat, 22 Oct 2005 19:57:38 +0000 (+0000) Subject: * {{lc:}} magic word X-Git-Tag: 1.6.0~1364 X-Git-Url: http://git.cyclocoop.org/%24dirpuce/puce%24spip_lang_rtl.gif?a=commitdiff_plain;h=664565673044dff98ec6a00840960686082f37fe;p=lhc%2Fweb%2Fwiklou.git * {{lc:}} magic word * {{uc:}} magic word --- diff --git a/includes/MagicWord.php b/includes/MagicWord.php index 94a10363b3..ac55efcb71 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -61,6 +61,8 @@ define('MAG_FULLURL', 46); define('MAG_FULLURLE', 47); define('MAG_LCFIRST', 48); define('MAG_UCFIRST', 49); +define('MAG_LC', 50); +define('MAG_UC', 51); $wgVariableIDs = array( MAG_CURRENTMONTH, diff --git a/includes/Parser.php b/includes/Parser.php index aa4b041129..8cc649bd78 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -2311,16 +2311,24 @@ class Parser } } - # LCFIRST and UCFIRST + # LCFIRST, UCFIRST, LC and UC if ( !$found ) { $lcfirst =& MagicWord::get( MAG_LCFIRST ); $ucfirst =& MagicWord::get( MAG_UCFIRST ); + $lc =& MagicWord::get( MAG_LC ); + $uc =& MagicWord::get( MAG_UC ); if ( $lcfirst->matchStartAndRemove( $part1 ) ) { $text = $linestart . $wgContLang->lcfirst( $part1 ); $found = true; } else if ( $ucfirst->matchStartAndRemove( $part1 ) ) { $text = $linestart . $wgContLang->ucfirst( $part1 ); $found = true; + } else if ( $lc->matchStartAndRemove( $part1 ) ) { + $text = $linestart . $wgContLang->lc( $part1 ); + $found = true; + } else if ( $uc->matchStartAndRemove( $part1 ) ) { + $text = $linestart . $wgContLang->uc( $part1 ); + $found = true; } } diff --git a/languages/Language.php b/languages/Language.php index 01e1612e84..387d27187e 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -238,6 +238,8 @@ $wgLanguageNamesEn =& $wgLanguageNames; MAG_FULLURLE => array( 0, 'FULLURLE:' ), MAG_LCFIRST => array( 0, 'LCFIRST:' ), MAG_UCFIRST => array( 0, 'UCFIRST:' ), + MAG_LC => array( 0, 'LC:' ), + MAG_UC => array( 0, 'UC:' ), ); #-------------------------------------------------------------------