r84359 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84358‎ | r84359 | r84360 >
Date:23:53, 19 March 2011
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
set threadaction to be PARAM_REQUIRED, don't do it explicitally, using empty (bleugh)

Add blank description for "operand" (Will poke werdna)

Added filled out description for gettoken
Modified paths:
  • /trunk/extensions/LiquidThreads/api/ApiThreadAction.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/api/ApiThreadAction.php
@@ -12,9 +12,6 @@
1313 return;
1414 }
1515
16 - if ( empty( $params['threadaction'] ) ) {
17 - $this->dieUsageMsg( array( 'missingparam', 'action' ) );
18 - }
1916
2017 $allowedAllActions = array( 'markread' );
2118 $action = $params['threadaction'];
@@ -843,12 +840,13 @@
844841 'type' => 'Specifies the type of reaction to add',
845842 'value' => 'Specifies the value associated with the reaction to add',
846843 'method' => 'For getting inline edit forms, the method to get a form for',
 844+ 'operand' => '',
 845+ 'gettoken' => 'Gets a thread token',
847846 );
848847 }
849848
850849 public function getPossibleErrors() {
851850 return array_merge( parent::getPossibleErrors(), array(
852 - array( 'missingparam', 'action' ),
853851 array( 'missingparam', 'talkpage' ),
854852 array( 'missingparam', 'subject' ),
855853 array( 'code' => 'too-many-threads', 'info' => 'You may only split one thread at a time' ),
@@ -894,6 +892,7 @@
895893 'talkpage' => null,
896894 'threadaction' => array(
897895 ApiBase::PARAM_TYPE => array_keys( $this->getActions() ),
 896+ ApiBase::PARAM_REQUIRED => true,
898897 ),
899898 'token' => null,
900899 'subject' => null,

Follow-up revisions

RevisionCommit summaryAuthorDate
r84376Fix r84359 with partial revert...reedy12:50, 20 March 2011

Comments

#Comment by Siebrand (talk | contribs)   08:58, 20 March 2011

Observed on translatewiki.net: cannot create new threads and cannot reply, i.e. completely broken.

#Comment by Reedy (talk | contribs)   09:50, 20 March 2011

Definitely this lqt one? I did another too

#Comment by Siebrand (talk | contribs)   19:14, 20 March 2011

Yep. And thanks for the fix.

Status & tagging log