* {{PLURAL}} can now take up to five forms. Needed for some languages
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Thu, 8 Jun 2006 19:42:07 +0000 (19:42 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Thu, 8 Jun 2006 19:42:07 +0000 (19:42 +0000)
RELEASE-NOTES
includes/Parser.php

index f1b26e3..814f328 100644 (file)
@@ -460,6 +460,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Added AutoLoader.php, which loads classes without need of require_once()
 * (bug 5981) Add plural function Slovenian (sl)
 * (bug 5945) Introduce {{CONTENTLANGUAGE}} magic word
+* {{PLURAL}} can now take up to five forms
 
 == Compatibility ==
 
index 2741428..db6e273 100644 (file)
@@ -2747,8 +2747,9 @@ class Parser
                if ( !$found && $argc >= 2 ) {
                        $mwPluralForm =& MagicWord::get( MAG_PLURAL );
                        if ( $mwPluralForm->matchStartAndRemove( $part1 ) ) {
-                               if ($argc==2) {$args[2]=$args[1];}
-                               $text = $linestart . $lang->convertPlural( $part1, $args[0], $args[1], $args[2]);
+                               while ( count($args) < 5 ) { $args[] = $args[count($args)-1]; }
+                               $text = $linestart . $lang->convertPlural( $part1, $args[0], $args[1],
+                                       $args[2], $args[3], $args[4]);
                                $found = true;
                        }
                }