Index: branches/js2-work/phase3/includes/api/ApiQueryAllmessages.php |
— | — | @@ -80,8 +80,13 @@ |
81 | 81 | if($skip && $message === $params['from']) |
82 | 82 | $skip = false; |
83 | 83 | if(!$skip) { |
| 84 | + |
84 | 85 | $a = array( 'name' => $message ); |
85 | | - $msg = wfMsgGetKey( $message, true, false, false ); |
| 86 | + if( isset( $params['arg'] ) && count( $params['arg'] ) != 0 ){ |
| 87 | + $msg = wfMsg( $message, $params['arg'] ); |
| 88 | + }else{ |
| 89 | + $msg = wfMsgGetKey( $message, true, false, false ); |
| 90 | + } |
86 | 91 | if ( wfEmptyMsg( $message, $msg ) ) |
87 | 92 | $a['missing'] = ''; |
88 | 93 | else { |
— | — | @@ -118,6 +123,9 @@ |
119 | 124 | 'default' |
120 | 125 | ) |
121 | 126 | ), |
| 127 | + 'arg' => array( |
| 128 | + ApiBase :: PARAM_ISMULTI => true |
| 129 | + ), |
122 | 130 | 'filter' => array(), |
123 | 131 | 'lang' => null, |
124 | 132 | 'from' => null, |
— | — | @@ -128,6 +136,7 @@ |
129 | 137 | return array ( |
130 | 138 | 'messages' => 'Which messages to output. "*" means all messages', |
131 | 139 | 'prop' => 'Which properties to get', |
| 140 | + 'arg' => 'Arguments to be substituted into msg', |
132 | 141 | 'filter' => 'Return only messages that contain this string', |
133 | 142 | 'lang' => 'Return messages in this language', |
134 | 143 | 'from' => 'Return messages starting at this message', |