Whoops, committed wrong version
authorX! <soxred93@users.mediawiki.org>
Wed, 24 Feb 2010 17:06:19 +0000 (17:06 +0000)
committerX! <soxred93@users.mediawiki.org>
Wed, 24 Feb 2010 17:06:19 +0000 (17:06 +0000)
includes/api/ApiBase.php

index 3905995..39205bd 100644 (file)
@@ -647,12 +647,12 @@ abstract class ApiBase {
                                        case 'user':
                                                if( !is_array( $value ) ) $value = array( $value );
                                                
-                                               foreach( $value as $val ) {
-                                                       $title = Title::makeTitleSafe( NS_USER, $value );
+                                               foreach( $value as $key => $val ) {
+                                                       $title = Title::makeTitleSafe( NS_USER, $val );
                                                        if ( is_null( $title ) ) {
                                                                $this->dieUsage( "Invalid value for user parameter $encParamName", "baduser_{$encParamName}" );
                                                        }
-                                                       $value = $title->getText();
+                                                       $value[$key] = $title->getText();
                                                }
                                                
                                                if( !$multi ) $value = $value[0];