r74609 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74608‎ | r74609 | r74610 >
Date:23:36, 10 October 2010
Author:platonides
Status:deferred
Tags:
Comment:
Remove urlencode. It overwrites the more powerful core urlencode.
There has been one there since r14273.
Modified paths:
  • /trunk/extensions/StringFunctions/StringFunctions.php (modified) (history)
  • /trunk/extensions/StringFunctions/StringFunctions_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/StringFunctions/StringFunctions_body.php
@@ -343,14 +343,6 @@
344344 }
345345
346346 /**
347 - * {{#urlencode:value}}
348 - */
349 - static function runUrlEncode( &$parser, $inStr = '' ) {
350 - # encode
351 - return urlencode( $inStr );
352 - }
353 -
354 - /**
355347 * {{#urldecode:value}}
356348 */
357349 static function runUrlDecode( &$parser, $inStr = '' ) {
Index: trunk/extensions/StringFunctions/StringFunctions.php
@@ -110,6 +110,7 @@
111111 );
112112
113113 $dir = dirname( __FILE__ ) . '/';
 114+$wgParserTestFiles[] = $dir . "/strFunctionsParserTests.txt";
114115 $wgExtensionMessagesFiles['StringFunctions'] = $dir . 'StringFunctions.i18n.php';
115116 $wgAutoloadClasses['ExtStringFunctions'] = $dir . 'StringFunctions_body.php';
116117
@@ -129,7 +130,6 @@
130131 $parser->setFunctionHook( 'pad', array( 'ExtStringFunctions', 'runPad' ) );
131132 $parser->setFunctionHook( 'replace', array( 'ExtStringFunctions', 'runReplace' ) );
132133 $parser->setFunctionHook( 'explode', array( 'ExtStringFunctions', 'runExplode' ) );
133 - $parser->setFunctionHook( 'urlencode', array( 'ExtStringFunctions', 'runUrlEncode' ) );
134134 $parser->setFunctionHook( 'urldecode', array( 'ExtStringFunctions', 'runUrlDecode' ) );
135135
136136 return true;
@@ -145,7 +145,6 @@
146146 $magicWords['pad'] = array( 0, 'pad' );
147147 $magicWords['replace'] = array( 0, 'replace' );
148148 $magicWords['explode'] = array( 0, 'explode' );
149 - $magicWords['urlencode'] = array( 0, 'urlencode' );
150149 $magicWords['urldecode'] = array( 0, 'urldecode' );
151150 }
152151 return true;

Follow-up revisions

RevisionCommit summaryAuthorDate
r104605Had this uncommited file lying around, with mtime 2010-10-11 02:03:55 GMT+2...platonides22:34, 29 November 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r14273(bug 839) Add URLENCODE magic wordrobchurch15:36, 17 May 2006

Status & tagging log