r14273 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14272‎ | r14273 | r14274 >
Date:15:36, 17 May 2006
Author:robchurch
Status:old
Tags:
Comment:
(bug 839) Add URLENCODE magic word
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/MagicWord.php (modified) (history)
  • /trunk/phase3/includes/Parser.php (modified) (history)
  • /trunk/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -2579,6 +2579,15 @@
25802580 }
25812581 }
25822582
 2583+ # URLENCODE
 2584+ if( !$found ) {
 2585+ $urlencode =& MagicWord::get( MAG_URLENCODE );
 2586+ if( $urlencode->matchStartAndRemove( $part1 ) ) {
 2587+ $text = $linestart . urlencode( $part1 );
 2588+ $found = true;
 2589+ }
 2590+ }
 2591+
25832592 # LCFIRST, UCFIRST, LC and UC
25842593 if ( !$found ) {
25852594 $lcfirst =& MagicWord::get( MAG_LCFIRST );
Index: trunk/phase3/includes/MagicWord.php
@@ -88,6 +88,7 @@
8989 'MAG_CURRENTVERSION',
9090 'MAG_BASEPAGENAME',
9191 'MAG_BASEPAGENAMEE',
 92+ 'MAG_URLENCODE',
9293 );
9394 if ( ! defined( 'MEDIAWIKI_INSTALL' ) )
9495 wfRunHooks( 'MagicWordMagicWords', array( &$magicWords ) );
@@ -138,6 +139,7 @@
139140 MAG_CURRENTVERSION,
140141 MAG_BASEPAGENAME,
141142 MAG_BASEPAGENAMEE,
 143+ MAG_URLENCODE,
142144 );
143145 if ( ! defined( 'MEDIAWIKI_INSTALL' ) )
144146 wfRunHooks( 'MagicWordwgVariableIDs', array( &$wgVariableIDs ) );
Index: trunk/phase3/RELEASE-NOTES
@@ -286,6 +286,7 @@
287287 * (bug 6001) PAGENAMEE and FULLPAGENAMEE don't work in FULLURL and LOCALURL magic
288288 words
289289 * (bug 5958) Switch Uzbek language name to use latin script
 290+* (bug 839) Add URLENCODE magic word
290291
291292 == Compatibility ==
292293
Index: trunk/phase3/languages/Language.php
@@ -286,6 +286,7 @@
287287 MAG_RAWSUFFIX => array( 1, 'R' ),
288288 MAG_NEWSECTIONLINK => array( 1, '__NEWSECTIONLINK__' ),
289289 MAG_CURRENTVERSION => array( 1, 'CURRENTVERSION' ),
 290+ MAG_URLENCODE => array( 0, 'URLENCODE:' ),
290291 );
291292
292293 if (!$wgCachedMessageArrays) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r74609Remove urlencode. It overwrites the more powerful core urlencode....platonides23:36, 10 October 2010

Status & tagging log