From fc38716f49103be28611aafb7eed992e5c1cba07 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Tue, 31 Aug 2010 21:06:01 +0000 Subject: [PATCH] ApiBase.php: "Don't show No more than 500 ( for bots) allowed" when MAX2 isn't set Trim trailing whitespace from Database.php --- includes/api/ApiBase.php | 6 +++++- includes/db/Database.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 29881e7e1a..ce3992a81b 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -341,7 +341,11 @@ abstract class ApiBase { $desc .= $paramPrefix . $prompt . implode( ', ', MWNamespace::getValidNamespaces() ); break; case 'limit': - $desc .= $paramPrefix . "No more than {$paramSettings[self :: PARAM_MAX]} ({$paramSettings[self::PARAM_MAX2]} for bots) allowed"; + $desc .= $paramPrefix . "No more than {$paramSettings[self :: PARAM_MAX]}"; + if ( isset( $paramSettings[self::PARAM_MAX2] ) ) { + $desc .= " ({$paramSettings[self::PARAM_MAX2]} for bots)"; + } + $desc .= ' allowed'; break; case 'integer': $hasMin = isset( $paramSettings[self::PARAM_MIN] ); diff --git a/includes/db/Database.php b/includes/db/Database.php index bdfb4f3c81..388a81e9a9 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -1383,7 +1383,7 @@ abstract class DatabaseBase implements DatabaseType { $on = $this->makeList((array)$join_conds_safe[$table][1], LIST_AND); if ( $on != '' ) { $tableClause .= ' ON (' . $on . ')'; - } + } $retJOIN[] = $tableClause; } else { $tableClause = $this->tableName( $table ); -- 2.20.1