http://www.mediawiki.org/wiki/Special:Code/MediaWiki/70555
Revision: 70555
Author: reedy
Date: 2010-08-06 11:20:39 +0000 (Fri, 06 Aug 2010)
Log Message:
-----------
Reduce unnecessary seperate nested if's, move them up to the top if (as per
most of the others where this is necessary!)
Modified Paths:
--------------
trunk/phase3/includes/api/ApiParamInfo.php
Modified: trunk/phase3/includes/api/ApiParamInfo.php
===================================================================
--- trunk/phase3/includes/api/ApiParamInfo.php 2010-08-06 11:18:39 UTC (rev
70554)
+++ trunk/phase3/includes/api/ApiParamInfo.php 2010-08-06 11:20:39 UTC (rev
70555)
@@ -141,19 +141,15 @@
if ( isset( $p[ApiBase::PARAM_DFLT] ) ) {
$a['default'] = $p[ApiBase::PARAM_DFLT];
}
- if ( isset( $p[ApiBase::PARAM_ISMULTI] ) ) {
- if ( $p[ApiBase::PARAM_ISMULTI] ) {
- $a['multi'] = '';
- $a['limit'] =
$this->getMain()->canApiHighLimits() ?
- ApiBase::LIMIT_SML2 :
- ApiBase::LIMIT_SML1;
- }
+ if ( isset( $p[ApiBase::PARAM_ISMULTI] ) &&
$p[ApiBase::PARAM_ISMULTI] ) {
+ $a['multi'] = '';
+ $a['limit'] =
$this->getMain()->canApiHighLimits() ?
+ ApiBase::LIMIT_SML2 :
+ ApiBase::LIMIT_SML1;
}
- if ( isset( $p[ApiBase::PARAM_ALLOW_DUPLICATES] ) ) {
- if ( $p[ApiBase::PARAM_ALLOW_DUPLICATES] ) {
- $a['allowsduplicates'] = '';
- }
+ if ( isset( $p[ApiBase::PARAM_ALLOW_DUPLICATES] ) &&
$p[ApiBase::PARAM_ALLOW_DUPLICATES] ) {
+ $a['allowsduplicates'] = '';
}
if ( isset( $p[ApiBase::PARAM_TYPE] ) ) {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs