r105440 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105439‎ | r105440 | r105441 >
Date:16:54, 7 December 2011
Author:danwe
Status:deferred
Tags:
Comment:
Version set to 2.0rc3 alpha, Adjusted for 'Regex Fun' extension 1.1
Modified paths:
  • /trunk/extensions/Arrays/Arrays.php (modified) (history)
  • /trunk/extensions/Arrays/Arrays_Settings.php (modified) (history)
  • /trunk/extensions/Arrays/RELEASE-NOTES (modified) (history)

Diff [purge]

Index: trunk/extensions/Arrays/RELEASE-NOTES
@@ -1,6 +1,9 @@
22 Changelog:
33 ==========
44
 5+ * (trunk) -- Version 2.0rc3 alpha
 6+ - Adjusted to work with 'Regex Fun' version 1.1
 7+
58 * December 5, 2011 -- Version 2.0rc2
69 - Bug introduced in r105069 fixed where '#arrayprint' was broken in compatibility mode in some cases.
710 - '#arraysearcharray' with 'e' using 'Regex Fun' no longer requires an escaped transform (parameter 6)
Index: trunk/extensions/Arrays/Arrays.php
@@ -11,7 +11,7 @@
1212 * @ingroup Arrays
1313 *
1414 * @licence MIT License
15 - * @version: 2.0rc2
 15+ * @version: 2.0rc3 alpha
1616 *
1717 * @author Li Ding < lidingpku@gmail.com >
1818 * @author Jie Bao
@@ -53,7 +53,7 @@
5454 *
5555 * @since 2.0 (before in 'Arrays' class since 1.3.2)
5656 */
57 - const VERSION = '2.0rc2';
 57+ const VERSION = '2.0rc3 alpha';
5858
5959 /**
6060 * Store for arrays.
@@ -312,7 +312,7 @@
313313
314314 // if there is no subject, there is no point in expanding. Faster!
315315 if( $subject === null ) {
316 - if( ! $egArraysCompatibilityMode ) {
 316+ if( ! $egArraysCompatibilityMode && $egArraysExpansionEscapeTemplates !== null ) {
317317 // we can ignore options here, since if subject is null, options won't be set as well!
318318 return trim( implode( $delimiter, $array ) );
319319 } else {
@@ -565,7 +565,7 @@
566566 if( preg_match( $needle, $value ) ) {
567567 // Found something!
568568 if( $rawTransform !== null ) {
569 - // Transform the found string. Can we use 'Regex Fun' ?
 569+ // Transform the matching string. Can we use 'Regex Fun' with special 'e' flag support ?
570570 if( $regexFunSupport ) {
571571 // do the transformation with Regex Fun to support 'e' flag:
572572 $transform = trim( $frame->expand(
@@ -574,10 +574,11 @@
575575 ) );
576576 $value = ExtRegexFun::doPregReplace(
577577 $needle,
578 - $transform,
 578+ $rawTransform,
579579 $value,
580580 -1,
581581 $parser,
 582+ $frame,
582583 array( ExtRegexFun::FLAG_REPLACEMENT_PARSE )
583584 );
584585 }
@@ -1247,6 +1248,8 @@
12481249 * changed because of special characters.
12491250 * Respects the configuration variable '$egArraysEscapeTemplates'.
12501251 *
 1252+ * This is a workaround for bug #32829
 1253+ *
12511254 * @since 2.0
12521255 *
12531256 * @param string $string
@@ -1301,7 +1304,7 @@
13021305 if( $support === null ) {
13031306 $support = (
13041307 defined( 'ExtRegexFun::VERSION' )
1305 - && version_compare( ExtRegexFun::VERSION, '1.0.1', '>=' )
 1308+ && version_compare( ExtRegexFun::VERSION, '1.1', '>=' )
13061309 );
13071310 }
13081311 return $support;
Index: trunk/extensions/Arrays/Arrays_Settings.php
@@ -43,4 +43,4 @@
4444 '|' => '{{!}}',
4545 '{{' => '{{((}}',
4646 '}}' => '{{))}}'
47 -);
\ No newline at end of file
 47+);

Status & tagging log