From 612c9342108170290440954d65d215023775355d Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Fri, 3 Dec 2010 16:24:05 +0000 Subject: [PATCH] * (bug 26219) Show API limits for multi values in description Also move bug 9675/r77612 RELEASE-NOTES to the correct section --- RELEASE-NOTES | 5 +++-- includes/api/ApiBase.php | 9 ++++++++- includes/db/Database.php | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 93fe493ecf..8e02e788b1 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -443,6 +443,8 @@ LocalSettings.php. The specific bugs are listed below in the general notes. case. * (bug 26164) Potential html injection when the database server isn't available * (bug 26160) Upload description set by extensions are not propagated +* (bug 9675) generateSitemap.php now takes an --urlpath parameter to allow + absolute URLs in the sitemap index (as required e.g. by Google) === API changes in 1.17 === * (bug 22738) Allow filtering by action type on query=logevent. @@ -543,8 +545,7 @@ LocalSettings.php. The specific bugs are listed below in the general notes. * (bug 26125) prop=imageinfo&iiprop=size now returns the page count if the file is a multi-page file * (bug 10268) Added linktodiffs parameter on action=feedwatchlist -* (bug 9675) generateSitemap.php now takes an --urlpath parameter to allow - absolute URLs in the sitemap index (as required e.g. by Google) +* (bug 26219) Show API limits for multi values in description === Languages updated in 1.17 === diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index df7ca1beeb..95397d5b36 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -366,10 +366,17 @@ abstract class ApiBase { } break; } + + if ( isset( $paramSettings[self::PARAM_ISMULTI] ) ) { + $desc .= $paramPrefix . "Maximum number of values " . + self::LIMIT_SML1 . " (" . self::LIMIT_SML2 . " for bots)"; + } } } - $default = is_array( $paramSettings ) ? ( isset( $paramSettings[self::PARAM_DFLT] ) ? $paramSettings[self::PARAM_DFLT] : null ) : $paramSettings; + $default = is_array( $paramSettings ) + ? ( isset( $paramSettings[self::PARAM_DFLT] ) ? $paramSettings[self::PARAM_DFLT] : null ) + : $paramSettings; if ( !is_null( $default ) && $default !== false ) { $desc .= $paramPrefix . "Default: $default"; } diff --git a/includes/db/Database.php b/includes/db/Database.php index b20f461c3d..3b960c6df0 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -1329,7 +1329,7 @@ abstract class DatabaseBase implements DatabaseType { * Makes an encoded list of strings from an array * $mode: * LIST_COMMA - comma separated, no field names - * LIST_AND - ANDed WHERE clause (without the WHERE) + * LIST_ANDLIST_AND - ANDed WHERE clause (without the WHERE) * LIST_OR - ORed WHERE clause (without the WHERE) * LIST_SET - comma separated with field names, like a SET clause * LIST_NAMES - comma separated field names -- 2.20.1