Index: trunk/phase3/includes/api/ApiEditPage.php |
— | — | @@ -172,40 +172,40 @@ |
173 | 173 | |
174 | 174 | // EditPage wants to parse its stuff from a WebRequest |
175 | 175 | // That interface kind of sucks, but it's workable |
176 | | - $reqArr = array( |
| 176 | + $requestArray = array( |
177 | 177 | 'wpTextbox1' => $params['text'], |
178 | 178 | 'wpEditToken' => $params['token'], |
179 | 179 | 'wpIgnoreBlankSummary' => '' |
180 | 180 | ); |
181 | 181 | |
182 | 182 | if ( !is_null( $params['summary'] ) ) { |
183 | | - $reqArr['wpSummary'] = $params['summary']; |
| 183 | + $requestArray['wpSummary'] = $params['summary']; |
184 | 184 | } |
185 | 185 | |
186 | 186 | if ( !is_null( $params['sectiontitle'] ) ) { |
187 | | - $reqArr['wpSectionTitle'] = $params['sectiontitle']; |
| 187 | + $requestArray['wpSectionTitle'] = $params['sectiontitle']; |
188 | 188 | } |
189 | 189 | |
190 | 190 | // Watch out for basetimestamp == '' |
191 | 191 | // wfTimestamp() treats it as NOW, almost certainly causing an edit conflict |
192 | 192 | if ( !is_null( $params['basetimestamp'] ) && $params['basetimestamp'] != '' ) { |
193 | | - $reqArr['wpEdittime'] = wfTimestamp( TS_MW, $params['basetimestamp'] ); |
| 193 | + $requestArray['wpEdittime'] = wfTimestamp( TS_MW, $params['basetimestamp'] ); |
194 | 194 | } else { |
195 | | - $reqArr['wpEdittime'] = $articleObj->getTimestamp(); |
| 195 | + $requestArray['wpEdittime'] = $articleObj->getTimestamp(); |
196 | 196 | } |
197 | 197 | |
198 | 198 | if ( !is_null( $params['starttimestamp'] ) && $params['starttimestamp'] != '' ) { |
199 | | - $reqArr['wpStarttime'] = wfTimestamp( TS_MW, $params['starttimestamp'] ); |
| 199 | + $requestArray['wpStarttime'] = wfTimestamp( TS_MW, $params['starttimestamp'] ); |
200 | 200 | } else { |
201 | | - $reqArr['wpStarttime'] = wfTimestampNow(); // Fake wpStartime |
| 201 | + $requestArray['wpStarttime'] = wfTimestampNow(); // Fake wpStartime |
202 | 202 | } |
203 | 203 | |
204 | 204 | if ( $params['minor'] || ( !$params['notminor'] && $user->getOption( 'minordefault' ) ) ) { |
205 | | - $reqArr['wpMinoredit'] = ''; |
| 205 | + $requestArray['wpMinoredit'] = ''; |
206 | 206 | } |
207 | 207 | |
208 | 208 | if ( $params['recreate'] ) { |
209 | | - $reqArr['wpRecreate'] = ''; |
| 209 | + $requestArray['wpRecreate'] = ''; |
210 | 210 | } |
211 | 211 | |
212 | 212 | if ( !is_null( $params['section'] ) ) { |
— | — | @@ -213,9 +213,9 @@ |
214 | 214 | if ( $section == 0 && $params['section'] != '0' && $params['section'] != 'new' ) { |
215 | 215 | $this->dieUsage( "The section parameter must be set to an integer or 'new'", "invalidsection" ); |
216 | 216 | } |
217 | | - $reqArr['wpSection'] = $params['section']; |
| 217 | + $requestArray['wpSection'] = $params['section']; |
218 | 218 | } else { |
219 | | - $reqArr['wpSection'] = ''; |
| 219 | + $requestArray['wpSection'] = ''; |
220 | 220 | } |
221 | 221 | |
222 | 222 | $watch = $this->getWatchlistValue( $params['watchlist'], $titleObj ); |
— | — | @@ -228,12 +228,12 @@ |
229 | 229 | } |
230 | 230 | |
231 | 231 | if ( $watch ) { |
232 | | - $reqArr['wpWatchthis'] = ''; |
| 232 | + $requestArray['wpWatchthis'] = ''; |
233 | 233 | } |
234 | 234 | |
235 | 235 | global $wgTitle, $wgRequest; |
236 | 236 | |
237 | | - $req = new DerivativeRequest( $this->getRequest(), $reqArr, true ); |
| 237 | + $req = new DerivativeRequest( $this->getRequest(), $requestArray, true ); |
238 | 238 | |
239 | 239 | // Some functions depend on $wgTitle == $ep->mTitle |
240 | 240 | // TODO: Make them not or check if they still do |