Followup r70460 per Umherirrender comment
authorSam Reed <reedy@users.mediawiki.org>
Fri, 6 Aug 2010 11:18:39 +0000 (11:18 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Fri, 6 Aug 2010 11:18:39 +0000 (11:18 +0000)
Add "required" to ApiParamInfo

includes/api/ApiParamInfo.php

index 0108c8f..793c274 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';