From: Ryan Kaldari Date: Tue, 20 Dec 2011 04:22:06 +0000 (+0000) Subject: $reqArr is an ambiguous variable name - req can mean required or request. Changing... X-Git-Tag: 1.31.0-rc.0~25887 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;ds=sidebyside;h=7e903243c6c3af6a4376b09c5660ec2f1730df78;hp=ac64223568a09e3072c15b81226ed873a10179e1;p=lhc%2Fweb%2Fwiklou.git $reqArr is an ambiguous variable name - req can mean required or request. Changing to an unambiguous name --- diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php index cfbf4ae39a..216468cc99 100644 --- a/includes/api/ApiEditPage.php +++ b/includes/api/ApiEditPage.php @@ -172,40 +172,40 @@ class ApiEditPage extends ApiBase { // EditPage wants to parse its stuff from a WebRequest // That interface kind of sucks, but it's workable - $reqArr = array( + $requestArray = array( 'wpTextbox1' => $params['text'], 'wpEditToken' => $params['token'], 'wpIgnoreBlankSummary' => '' ); if ( !is_null( $params['summary'] ) ) { - $reqArr['wpSummary'] = $params['summary']; + $requestArray['wpSummary'] = $params['summary']; } if ( !is_null( $params['sectiontitle'] ) ) { - $reqArr['wpSectionTitle'] = $params['sectiontitle']; + $requestArray['wpSectionTitle'] = $params['sectiontitle']; } // Watch out for basetimestamp == '' // wfTimestamp() treats it as NOW, almost certainly causing an edit conflict if ( !is_null( $params['basetimestamp'] ) && $params['basetimestamp'] != '' ) { - $reqArr['wpEdittime'] = wfTimestamp( TS_MW, $params['basetimestamp'] ); + $requestArray['wpEdittime'] = wfTimestamp( TS_MW, $params['basetimestamp'] ); } else { - $reqArr['wpEdittime'] = $articleObj->getTimestamp(); + $requestArray['wpEdittime'] = $articleObj->getTimestamp(); } if ( !is_null( $params['starttimestamp'] ) && $params['starttimestamp'] != '' ) { - $reqArr['wpStarttime'] = wfTimestamp( TS_MW, $params['starttimestamp'] ); + $requestArray['wpStarttime'] = wfTimestamp( TS_MW, $params['starttimestamp'] ); } else { - $reqArr['wpStarttime'] = wfTimestampNow(); // Fake wpStartime + $requestArray['wpStarttime'] = wfTimestampNow(); // Fake wpStartime } if ( $params['minor'] || ( !$params['notminor'] && $user->getOption( 'minordefault' ) ) ) { - $reqArr['wpMinoredit'] = ''; + $requestArray['wpMinoredit'] = ''; } if ( $params['recreate'] ) { - $reqArr['wpRecreate'] = ''; + $requestArray['wpRecreate'] = ''; } if ( !is_null( $params['section'] ) ) { @@ -213,9 +213,9 @@ class ApiEditPage extends ApiBase { if ( $section == 0 && $params['section'] != '0' && $params['section'] != 'new' ) { $this->dieUsage( "The section parameter must be set to an integer or 'new'", "invalidsection" ); } - $reqArr['wpSection'] = $params['section']; + $requestArray['wpSection'] = $params['section']; } else { - $reqArr['wpSection'] = ''; + $requestArray['wpSection'] = ''; } $watch = $this->getWatchlistValue( $params['watchlist'], $titleObj ); @@ -228,12 +228,12 @@ class ApiEditPage extends ApiBase { } if ( $watch ) { - $reqArr['wpWatchthis'] = ''; + $requestArray['wpWatchthis'] = ''; } global $wgTitle, $wgRequest; - $req = new DerivativeRequest( $this->getRequest(), $reqArr, true ); + $req = new DerivativeRequest( $this->getRequest(), $requestArray, true ); // Some functions depend on $wgTitle == $ep->mTitle // TODO: Make them not or check if they still do