From 8f98402e5123acbe8f5b04588facbf8ca4aeb705 Mon Sep 17 00:00:00 2001 From: Victor Vasiliev Date: Tue, 6 May 2008 05:12:47 +0000 Subject: [PATCH] * (bug 13965) Hardcoded 51 limit on titles is too limiting --- includes/api/ApiBase.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 0b496b90e0..325bd92a3c 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -508,8 +508,9 @@ abstract class ApiBase { protected function parseMultiValue($valueName, $value, $allowMultiple, $allowedValues) { if( trim($value) === "" ) return array(); - $valuesList = explode('|', $value,51); // some kind of limit is needed here! - if( count($valuesList) == 51 ) { + $sizeLimit = $this->mMainModule->canApiHighLimits() ? 501 : 51; + $valuesList = explode('|', $value,$sizeLimit); + if( count($valuesList) == $sizeLimit ) { $junk = array_pop($valuesList); // kill last jumbled param } if (!$allowMultiple && count($valuesList) != 1) { -- 2.20.1