Index: branches/js2-work/phase3/includes/api/ApiQueryAllmessages.php |
— | — | @@ -81,17 +81,20 @@ |
82 | 82 | $skip = false; |
83 | 83 | if(!$skip) { |
84 | 84 | $a = array( 'name' => $message ); |
| 85 | + $args = null; |
85 | 86 | if( isset( $params['args'] ) && count( $params['args'] ) != 0 ){ |
86 | | - // Check if the parser is enabled: |
87 | | - if( $params[ 'enableparser' ] ){ |
88 | | - $msg = wfMsgExt( $message, array( 'parsemag' ), $params['args'] ); |
89 | | - } else { |
90 | | - $msgString = wfMsgGetKey( $message, true, false, false ); |
91 | | - $msg = wfMsgReplaceArgs( $msgString, $params['args'] ); |
92 | | - } |
| 87 | + $args = $params['args']; |
| 88 | + } |
| 89 | + // Check if the parser is enabled: |
| 90 | + if( $params[ 'enableparser' ] ){ |
| 91 | + $msg = wfMsgExt( $message, array( 'parsemag' ), $args ); |
| 92 | + } else if ( $args ) { |
| 93 | + $msgString = wfMsgGetKey( $message, true, false, false ); |
| 94 | + $msg = wfMsgReplaceArgs( $msgString, $params['args'] ); |
93 | 95 | }else{ |
94 | 96 | $msg = wfMsgGetKey( $message, true, false, false ); |
95 | 97 | } |
| 98 | + |
96 | 99 | if ( wfEmptyMsg( $message, $msg ) ) |
97 | 100 | $a['missing'] = ''; |
98 | 101 | else { |