From e0b7262afc6449917f83f5f0792380f6f618934a Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 3 Nov 2006 08:36:28 +0000 Subject: [PATCH] Revert r17367 "(bug 7723) Add ic: parser function, with alias tc:, which capitalises the first letter of each word." Feature creep with no apparent usefulness; would produce obviously incorrect results for mixed-case or all-caps words. --- RELEASE-NOTES | 2 -- includes/CoreParserFunctions.php | 7 ------- includes/Parser.php | 1 - languages/messages/MessagesEn.php | 3 +-- 4 files changed, 1 insertion(+), 12 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f377502bb1..617fd1b93d 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -125,8 +125,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Remove entries from redirect table on article deletion * (bug 7788) Force section headers in new section links for users who have 'prompt for blank edit summaries' on. -* (bug 7723) Add ic: parser function, with alias tc:, which capitalises the first - letter of each word. * (bug 1133) Special:Emailuser: add an option to send yourself a copy your mail. * (bug 461) Allow "Categories:" link at bottom of pages to be customized via pagecategorieslink message. diff --git a/includes/CoreParserFunctions.php b/includes/CoreParserFunctions.php index 2b05437286..b2ee789dd2 100644 --- a/includes/CoreParserFunctions.php +++ b/includes/CoreParserFunctions.php @@ -59,13 +59,6 @@ class CoreParserFunctions { return $wgContLang->uc( $s ); } - static function ic( $parser, $s = '' ) { - /*Testing showed that ucwords does NOT convert the rest of the words to lowercase - * Converting it all to lowercase first fixes this. */ - $s = strtolower($s); - return ucwords($s); - } - static function localurl( $parser, $s = '', $arg = null ) { return self::urlFunction( 'getLocalURL', $s, $arg ); } static function localurle( $parser, $s = '', $arg = null ) { return self::urlFunction( 'escapeLocalURL', $s, $arg ); } static function fullurl( $parser, $s = '', $arg = null ) { return self::urlFunction( 'getFullURL', $s, $arg ); } diff --git a/includes/Parser.php b/includes/Parser.php index aa88282f2f..336b6f8f32 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -165,7 +165,6 @@ class Parser $this->setFunctionHook( 'padright', array( 'CoreParserFunctions', 'padright' ), SFH_NO_HASH ); $this->setFunctionHook( 'anchorencode', array( 'CoreParserFunctions', 'anchorencode' ), SFH_NO_HASH ); $this->setFunctionHook( 'special', array( 'CoreParserFunctions', 'special' ) ); - $this->setFunctionHook( 'ic', array( 'CoreParserFunctions', 'ic' ), SFH_NO_HASH ); if ( $wgAllowDisplayTitle ) { $this->setFunctionHook( 'displaytitle', array( 'CoreParserFunctions', 'displaytitle' ), SFH_NO_HASH ); diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index c65247d747..450e697c6e 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -307,7 +307,7 @@ $magicWords = array( 'newsectionlink' => array( 1, '__NEWSECTIONLINK__' ), 'currentversion' => array( 1, 'CURRENTVERSION' ), 'urlencode' => array( 0, 'URLENCODE:' ), - 'anchorencode' => array( 0, 'ANCHORENCODE' ), + 'anchorencode' => array( 0, 'ANCHORENCODE' ), 'currenttimestamp' => array( 1, 'CURRENTTIMESTAMP' ), 'localtimestamp' => array( 1, 'LOCALTIMESTAMP' ), 'directionmark' => array( 1, 'DIRECTIONMARK', 'DIRMARK' ), @@ -319,7 +319,6 @@ $magicWords = array( 'padleft' => array( 0, 'PADLEFT' ), 'padright' => array( 0, 'PADRIGHT' ), 'special' => array( 0, 'special', ), - 'ic' => array( 0, 'ic:', 'tc:' ), ); /** -- 2.20.1