r72051 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72050‎ | r72051 | r72052 >
Date:21:06, 31 August 2010
Author:reedy
Status:ok (Comments)
Tags:
Comment:
ApiBase.php:

"Don't show No more than 500 ( for bots) allowed" when MAX2 isn't set

Trim trailing whitespace from Database.php
Modified paths:
  • /trunk/phase3/includes/api/ApiBase.php (modified) (history)
  • /trunk/phase3/includes/db/Database.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/Database.php
@@ -1383,7 +1383,7 @@
13841384 $on = $this->makeList((array)$join_conds_safe[$table][1], LIST_AND);
13851385 if ( $on != '' ) {
13861386 $tableClause .= ' ON (' . $on . ')';
1387 - }
 1387+ }
13881388 $retJOIN[] = $tableClause;
13891389 } else {
13901390 $tableClause = $this->tableName( $table );
Index: trunk/phase3/includes/api/ApiBase.php
@@ -341,7 +341,11 @@
342342 $desc .= $paramPrefix . $prompt . implode( ', ', MWNamespace::getValidNamespaces() );
343343 break;
344344 case 'limit':
345 - $desc .= $paramPrefix . "No more than {$paramSettings[self :: PARAM_MAX]} ({$paramSettings[self::PARAM_MAX2]} for bots) allowed";
 345+ $desc .= $paramPrefix . "No more than {$paramSettings[self :: PARAM_MAX]}";
 346+ if ( isset( $paramSettings[self::PARAM_MAX2] ) ) {
 347+ $desc .= " ({$paramSettings[self::PARAM_MAX2]} for bots)";
 348+ }
 349+ $desc .= ' allowed';
346350 break;
347351 case 'integer':
348352 $hasMin = isset( $paramSettings[self::PARAM_MIN] );

Comments

#Comment by Reedy (talk | contribs)   18:36, 1 September 2010

Note for myself.. If MAX is set, but MAX2 isn't, fall MAX2 back to MAX. It's hardly major (not worth dieDebug!)

Status & tagging log