r112770 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112769‎ | r112770 | r112771 >
Date:04:14, 1 March 2012
Author:saper
Status:resolved (Comments)
Tags:
Comment:
Fix bug 34838 when a response to Moodbar feedback is posted

Use DerivativeRequest instead of FauxRequest when editing
anything
Modified paths:
  • /trunk/extensions/MoodBar/ApiFeedbackDashboardResponse.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/ApiFeedbackDashboardResponse.php
@@ -47,18 +47,20 @@
4848 $this->disableUserTalkEmailNotification();
4949
5050 $id = intval( $item->getProperty( 'id' ) );
51 - $api = new ApiMain( new FauxRequest( array(
52 - 'action' => 'edit',
53 - 'title' => $talkPage->getFullText(),
54 - 'appendtext' => ( $talkPage->exists() ? "\n\n" : '' ) .
55 - $feedback_link . "\n" .
56 - '<span id="feedback-dashboard-response-' . $id . '"></span>' . "\n\n" .
57 - $response . "\n\n~~~~\n\n" .
58 - '<span class="markashelpful-mbresponse-' . $id . '">&#160;</span>',
59 - 'token' => $params['token'],
60 - 'summary' => $summary,
61 - 'notminor' => true,
62 - ), true, array( 'wsEditToken' => $wgRequest->getSessionData( 'wsEditToken' ) ) ), true );
 51+ $api = new ApiMain( new DerivativeRequest(
 52+ $wgRequest,
 53+ array(
 54+ 'action' => 'edit',
 55+ 'title' => $talkPage->getFullText(),
 56+ 'appendtext' => ( $talkPage->exists() ? "\n\n" : '' ) .
 57+ $feedback_link . "\n" .
 58+ '<span id="feedback-dashboard-response-' . $id . '"></span>' . "\n\n" .
 59+ $response . "\n\n~~~~\n\n" .
 60+ '<span class="markashelpful-mbresponse-' . $id . '">&#160;</span>',
 61+ 'token' => $params['token'],
 62+ 'summary' => $summary,
 63+ 'notminor' => true,
 64+ ), true, array( 'wsEditToken' => $wgRequest->getSessionData( 'wsEditToken' ) ) ), true );
6365
6466 $api->execute();
6567

Follow-up revisions

RevisionCommit summaryAuthorDate
r112771Followup-To: r112770 DerivativeRequest only takes 3 arguments, not four.saper04:36, 1 March 2012
r112775Fix bug 34838 for Extension:Collection when posting book to a wikipage...saper05:32, 1 March 2012
r112848MFT r112770, r112771, r112772, r112775reedy23:03, 1 March 2012
r113037MFT r110703, r110933, r111011, r111218, r112520, r112524, r112660, r112687, r...reedy14:59, 5 March 2012

Comments

#Comment by Aaron Schulz (talk | contribs)   04:27, 1 March 2012

DerivativeRequest only takes 3 arguments, not four.

#Comment by Saper (talk | contribs)   04:47, 1 March 2012

Thanks, fixed in r112771

Status & tagging log