r74095 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74094‎ | r74095 | r74096 >
Date:19:37, 1 October 2010
Author:reedy
Status:ok
Tags:
Comment:
Remove error from ApiUserrights getPossibleErrors, it doesn't explicitally throw an error for missing user param. Does some other fancy errors from the special page. We should have a way for that to tell us it throws some errors....

Remove trailing whitespace
Modified paths:
  • /trunk/phase3/includes/api/ApiParamInfo.php (modified) (history)
  • /trunk/phase3/includes/api/ApiUserrights.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiUserrights.php
@@ -122,9 +122,7 @@
123123 }
124124
125125 public function getPossibleErrors() {
126 - return array_merge( parent::getPossibleErrors(), array(
127 - array( 'missingparam', 'user' ),
128 - ) );
 126+ return parent::getPossibleErrors();
129127 }
130128
131129 public function getTokenSalt() {
Index: trunk/phase3/includes/api/ApiParamInfo.php
@@ -119,11 +119,10 @@
120120 if ( isset( $p[ApiBase::PARAM_DEPRECATED] ) && $p[ApiBase::PARAM_DEPRECATED] ) {
121121 $a['deprecated'] = '';
122122 }
123 -
124123 if ( isset( $p[ApiBase::PARAM_REQUIRED] ) && $p[ApiBase::PARAM_REQUIRED] ) {
125124 $a['required'] = '';
126125 }
127 -
 126+
128127 if ( !is_array( $p ) ) {
129128 if ( is_bool( $p ) ) {
130129 $a['type'] = 'bool';

Follow-up revisions

RevisionCommit summaryAuthorDate
r74099Minor followup to r74095, remove method as all it does is call it's parent (T...reedy20:17, 1 October 2010

Status & tagging log