Index: trunk/extensions/WikiLove/WikiLove.api.php |
— | — | @@ -19,10 +19,13 @@ |
20 | 20 | $this->saveInDb( $talk, $params['subject'], $params['message'], $params['type'], isset( $params['email'] ) ? 1 : 0 ); |
21 | 21 | } |
22 | 22 | |
| 23 | + $article = new Article( $talk, 0 ); |
| 24 | + |
| 25 | + // not using section => 'new' here, as we like to give our own edit summary |
23 | 26 | $api = new ApiMain( new FauxRequest( array( |
24 | 27 | 'action' => 'edit', |
25 | 28 | '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'] ), |
27 | 30 | 'token' => $params['token'], |
28 | 31 | 'summary' => wfMsgForContent( 'wikilove-summary', $wgParser->stripSectionName( $params['subject'] ) ), |
29 | 32 | 'notminor' => true, |