r89538 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89537‎ | r89538 | r89539 >
Date:21:56, 5 June 2011
Author:reedy
Status:ok
Tags:
Comment:
Fix 2 usages of 'bool' when 'boolean' is used elsewhere
Modified paths:
  • /trunk/phase3/includes/api/ApiParamInfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiParamInfo.php
@@ -134,7 +134,7 @@
135135 if ( !isset( $p[ApiBase::PARAM_TYPE] ) ) {
136136 $dflt = isset( $p[ApiBase::PARAM_DFLT] ) ? $p[ApiBase::PARAM_DFLT] : null;
137137 if ( is_bool( $dflt ) ) {
138 - $p[ApiBase::PARAM_TYPE] = 'bool';
 138+ $p[ApiBase::PARAM_TYPE] = 'boolean';
139139 } elseif ( is_string( $dflt ) || is_null( $dflt ) ) {
140140 $p[ApiBase::PARAM_TYPE] = 'string';
141141 } elseif ( is_int( $dflt ) ) {
@@ -151,7 +151,7 @@
152152
153153 if ( isset( $p[ApiBase::PARAM_DFLT] ) ) {
154154 $type = $p[ApiBase::PARAM_TYPE];
155 - if( $type === 'bool' ) {
 155+ if( $type === 'boolean' ) {
156156 $a['default'] = ( $p[ApiBase::PARAM_DFLT] ? 'true' : 'false' );
157157 } elseif( $type === 'string' ) {
158158 $a['default'] = strval( $p[ApiBase::PARAM_DFLT] );

Status & tagging log