r90046 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90045‎ | r90046 | r90047 >
Date:14:39, 14 June 2011
Author:janpaul123
Status:ok
Tags:
Comment:
Modified paths:
  • /trunk/extensions/WikiLove/WikiLove.api.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiLove/WikiLove.api.php
@@ -19,10 +19,13 @@
2020 $this->saveInDb( $talk, $params['subject'], $params['message'], $params['type'], isset( $params['email'] ) ? 1 : 0 );
2121 }
2222
 23+ $article = new Article( $talk, 0 );
 24+
 25+ // not using section => 'new' here, as we like to give our own edit summary
2326 $api = new ApiMain( new FauxRequest( array(
2427 'action' => 'edit',
2528 'title' => $talk->getFullText(),
26 - 'text' => Article::newFromTitle( $talk, new RequestContext() )->replaceSection( 'new', $params['text'], $params['subject'] ),
 29+ 'text' => $article->replaceSection( 'new', $params['text'], $params['subject'] ),
2730 'token' => $params['token'],
2831 'summary' => wfMsgForContent( 'wikilove-summary', $wgParser->stripSectionName( $params['subject'] ) ),
2932 'notminor' => true,

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r90017Fixed problem: Edit Summary should mention WikiLovejanpaul12322:23, 13 June 2011

Status & tagging log