r90138 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90137‎ | r90138 | r90139 >
Date:19:08, 15 June 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: MFT r90136
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/WikiLove (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.api.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.api.php
@@ -19,13 +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 -
2523 // not using section => 'new' here, as we like to give our own edit summary
2624 $api = new ApiMain( new FauxRequest( array(
2725 'action' => 'edit',
2826 'title' => $talk->getFullText(),
29 - 'text' => $article->replaceSection( 'new', $params['text'], $params['subject'] ),
 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'],
3030 'token' => $params['token'],
3131 'summary' => wfMsgForContent( 'wikilove-summary', $wgParser->stripSectionName( $params['subject'] ) ),
3232 'notminor' => true,
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove
___________________________________________________________________
Modified: svn:mergeinfo
3333 Merged /trunk/extensions/WikiLove:r90136

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r90136Fixes sending WikiLove to a non-existing talk pagejanpaul12319:03, 15 June 2011

Status & tagging log