r14302 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14301‎ | r14302 | r14303 >
Date:01:39, 20 May 2006
Author:yurik
Status:old
Tags:
Comment:
Bugfix: handle true/false parameters. Allows "rvcomments=true" to be given without the "=true" part.
Modified paths:
  • /trunk/extensions/BotQuery/query.php (modified) (history)

Diff [purge]

Index: trunk/extensions/BotQuery/query.php
@@ -217,7 +217,7 @@
218218 )),
219219 'revisions' => array( "genPageHistory", false,
220220 array( 'rvcomments', 'rvlimit', 'rvoffset', 'rvstart', 'rvend' ),
221 - array( null, 50, 0, null, null ),
 221+ array( false, 50, 0, null, null ),
222222 array(
223223 "Revision history - Lists edits performed to the given pages",
224224 "Parameters supported:",
@@ -1008,6 +1008,10 @@
10091009 case 'integer':
10101010 $result = $wgRequest->getInt( $param, $dflt );
10111011 break;
 1012+ case 'boolean':
 1013+ // Having a default value of 'true' is pointless
 1014+ $result = $wgRequest->getCheck( $param );
 1015+ break;
10121016 case 'array':
10131017 $result = $this->parseMultiValue( $param, $dflt );
10141018 break;

Status & tagging log