Revert changes to SpecialSearch.php in r70608 because Special:Search didn't load...
[lhc/web/wiklou.git] / includes / api / ApiParamInfo.php
index 0108c8f..6e26b30 100644 (file)
@@ -118,6 +118,11 @@ class ApiParamInfo extends ApiBase {
                        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';
@@ -136,19 +141,15 @@ class ApiParamInfo extends ApiBase {
                        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] ) ) {