r68458 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68457‎ | r68458 | r68459 >
Date:17:19, 23 June 2010
Author:kaldari
Status:resolved (Comments)
Tags:
Comment:
adding extended Latin to allowable chars for template message names per bug 16320
Modified paths:
  • /trunk/extensions/CentralNotice/SpecialNoticeTemplate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialNoticeTemplate.php
@@ -334,7 +334,7 @@
335335
336336 // Extract message fields from the template body
337337 $fields = array();
338 - preg_match_all( '/\{\{\{([A-Za-z0-9\_\-\x{00C0}-\x{00D6}\x{00D8}-\x{00F6}\x{00F8}-\x{00FF}]+)\}\}\}/u', $body, $fields );
 338+ preg_match_all( '/\{\{\{([A-Za-z0-9\_\-\x{00C0}-\x{017F}]+)\}\}\}/u', $body, $fields );
339339
340340 // If there are any messages in the template, display translation tools.
341341 if ( count( $fields[0] ) > 0 ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r70473updating comments to Doxygen style, additional fix for bug 16320kaldari18:45, 4 August 2010
r71376changing to legalChars() per comment at r68458kaldari20:16, 20 August 2010
r71517using legalChars() per comment at r68458kaldari22:22, 23 August 2010

Comments

#Comment by Kaldari (talk | contribs)   18:46, 4 August 2010

This is actually an incomplete fix. The rest of the fix for bug 16320 is in r70473.

#Comment by Tim Starling (talk | contribs)   08:40, 20 August 2010

Why are you limiting it to extended latin? It would work just as well if you allowed all title characters wouldn't it? You could use Title::legalChars().

#Comment by Kaldari (talk | contribs)   17:03, 20 August 2010

Awesome, that's the method I was searching for! I knew we had to have something for that. Thanks.

#Comment by Kaldari (talk | contribs)   23:22, 20 August 2010

fixed in r71376.

#Comment by Tim Starling (talk | contribs)   02:53, 21 August 2010

You didn't fix the one in SpecialNoticeTemplate::findFields().

Status & tagging log