https://www.mediawiki.org/wiki/Special:Code/MediaWiki/106299

Revision: 106299
Author:   danwe
Date:     2011-12-15 01:29:23 +0000 (Thu, 15 Dec 2011)
Log Message:
-----------
Bug fixed where '#arraysearch' would always return '-1' instead of parameter 5 
value.

Modified Paths:
--------------
    trunk/extensions/Arrays/Arrays.php
    trunk/extensions/Arrays/RELEASE-NOTES

Modified: trunk/extensions/Arrays/Arrays.php
===================================================================
--- trunk/extensions/Arrays/Arrays.php  2011-12-15 01:13:29 UTC (rev 106298)
+++ trunk/extensions/Arrays/Arrays.php  2011-12-15 01:29:23 UTC (rev 106299)
@@ -500,12 +500,15 @@
                        }
                }
 
-               global $egArraysCompatibilityMode;
-
                // no match! (Expand only when needed!)
-               $no = isset( $args[4] )
-                         ? trim( $frame->expand( $args[4] ) )
-                         : $egArraysCompatibilityMode ? '-1' : ''; // 
COMPATIBILITY-MODE
+               if( isset( $args[4] ) ) {
+                       $no = trim( $frame->expand( $args[4] ) );
+               } else {
+                       global $egArraysCompatibilityMode;
+                       $no = $egArraysCompatibilityMode
+                               ? '-1' // COMPATIBILITY-MODE
+                               : '';
+               }
                return $no;
        }
 

Modified: trunk/extensions/Arrays/RELEASE-NOTES
===================================================================
--- trunk/extensions/Arrays/RELEASE-NOTES       2011-12-15 01:13:29 UTC (rev 
106298)
+++ trunk/extensions/Arrays/RELEASE-NOTES       2011-12-15 01:29:23 UTC (rev 
106299)
@@ -6,6 +6,7 @@
    - '{{#arraydefine: a |}}' will create an empty array instead of an array 
with an empty element as in
      version 1.3.2. A new option 'singleempty' can be used to avoid this 
behavior, ',' can be used to
      create an array with two empty elements.
+   - Bug fixed where '#arraysearch' would always return '-1' instead of 
parameter 5 value.
 
  * December 5, 2011 -- Version 2.0rc2
     - Bug introduced in r105069 fixed where '#arrayprint' was broken in 
compatibility mode in some cases.


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to