r64055 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64054‎ | r64055 | r64056 >
Date:02:03, 23 March 2010
Author:conrad
Status:deferred
Tags:
Comment:
svip: Fixing undefined offset in GlobalFunctions.php
Modified paths:
  • /trunk/extensions/NaturalLanguageList/NaturalLanguageList.php (modified) (history)

Diff [purge]

Index: trunk/extensions/NaturalLanguageList/NaturalLanguageList.php
@@ -140,11 +140,7 @@
141141 $length = count( $this->mParams );
142142 if ( $length == 1 ) {
143143 if ( $this->mOptions['fieldsperitem'] > 1 ) {
144 - $r = array();
145 - foreach( $this->mParams[0] as $i => $v ) {
146 - $r[$i+1] = $v;
147 - }
148 - return wfMsgReplaceArgs( $this->mOptions['itemcover'], $r );
 144+ return wfMsgReplaceArgs( $this->mOptions['itemcover'], $this->mParams[0] );
149145 } else {
150146 return $this->mOptions['itemcover'] === null
151147 ? wfMsg ( 'nll-itemcover' , $this->mParams[0] )
@@ -154,11 +150,7 @@
155151 $str = '';
156152 foreach( $this->mParams as $i => $param ) {
157153 if ( $this->mOptions['fieldsperitem'] > 1 ) {
158 - $r = array();
159 - foreach( $param as $i => $v ) {
160 - $r[$i+1] = $v;
161 - }
162 - $str .= wfMsgReplaceArgs( $this->mOptions['itemcover'], $r );
 154+ $str .= wfMsgReplaceArgs( $this->mOptions['itemcover'], $param );
163155 } else {
164156 $str .= $this->mOptions['itemcover'] === null
165157 ? wfMsg ( 'nll-itemcover' , $param )

Status & tagging log