r112759 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112758‎ | r112759 | r112760 >
Date:01:48, 1 March 2012
Author:aaron
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/wmf/1.19wmf1/extensions (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/WikiLove/ApiWikiLove.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.19wmf1/extensions/WikiLove/ApiWikiLove.php
@@ -20,16 +20,25 @@
2121 }
2222
2323 // not using section => 'new' here, as we like to give our own edit summary
24 - $api = new ApiMain( new FauxRequest( array(
25 - 'action' => 'edit',
26 - 'title' => $talk->getFullText(),
27 - // need to do this, as Article::replaceSection fails for non-existing pages
28 - 'appendtext' => ( $talk->exists() ? "\n\n" : '' ) . wfMsgForContent( 'newsectionheaderdefaultlevel', $params['subject'] )
29 - . "\n\n" . $params['text'],
30 - 'token' => $params['token'],
31 - 'summary' => wfMsgForContent( 'wikilove-summary', $wgParser->stripSectionName( $params['subject'] ) ),
32 - 'notminor' => true,
33 - ), false, array( 'wsEditToken' => $wgRequest->getSessionData( 'wsEditToken' ) ) ), true );
 24+ $api = new ApiMain(
 25+ new DerivativeRequest(
 26+ $wgRequest,
 27+ array(
 28+ 'action' => 'edit',
 29+ 'title' => $talk->getFullText(),
 30+ // need to do this, as Article::replaceSection fails for non-existing pages
 31+ 'appendtext' => ( $talk->exists() ? "\n\n" : '' ) .
 32+ wfMsgForContent( 'newsectionheaderdefaultlevel', $params['subject'] )
 33+ . "\n\n" . $params['text'],
 34+ 'token' => $params['token'],
 35+ 'summary' => wfMsgForContent( 'wikilove-summary',
 36+ $wgParser->stripSectionName( $params['subject'] ) ),
 37+ 'notminor' => true
 38+ ),
 39+ false // was posted?
 40+ ),
 41+ true // enable write?
 42+ );
3443
3544 $api->execute();
3645
Property changes on: branches/wmf/1.19wmf1/extensions
___________________________________________________________________
Modified: svn:mergeinfo
3746 Merged /trunk/extensions:r112758

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r112758Use DerivativeRequest subclass of FauxRequest in order to pass on IP and Agen...aaron01:45, 1 March 2012

Status & tagging log