http://www.mediawiki.org/wiki/Special:Code/MediaWiki/74095
Revision: 74095
Author: reedy
Date: 2010-10-01 19:37:38 +0000 (Fri, 01 Oct 2010)
Log Message:
-----------
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
trunk/phase3/includes/api/ApiUserrights.php
Modified: trunk/phase3/includes/api/ApiParamInfo.php
===================================================================
--- trunk/phase3/includes/api/ApiParamInfo.php 2010-10-01 19:37:33 UTC (rev
74094)
+++ trunk/phase3/includes/api/ApiParamInfo.php 2010-10-01 19:37:38 UTC (rev
74095)
@@ -119,11 +119,10 @@
if ( isset( $p[ApiBase::PARAM_DEPRECATED] ) &&
$p[ApiBase::PARAM_DEPRECATED] ) {
$a['deprecated'] = '';
}
-
if ( isset( $p[ApiBase::PARAM_REQUIRED] ) &&
$p[ApiBase::PARAM_REQUIRED] ) {
$a['required'] = '';
}
-
+
if ( !is_array( $p ) ) {
if ( is_bool( $p ) ) {
$a['type'] = 'bool';
Modified: trunk/phase3/includes/api/ApiUserrights.php
===================================================================
--- trunk/phase3/includes/api/ApiUserrights.php 2010-10-01 19:37:33 UTC (rev
74094)
+++ trunk/phase3/includes/api/ApiUserrights.php 2010-10-01 19:37:38 UTC (rev
74095)
@@ -122,9 +122,7 @@
}
public function getPossibleErrors() {
- return array_merge( parent::getPossibleErrors(), array(
- array( 'missingparam', 'user' ),
- ) );
+ return parent::getPossibleErrors();
}
public function getTokenSalt() {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs