From: Victor Vasiliev Date: Tue, 6 May 2008 05:12:47 +0000 (+0000) Subject: * (bug 13965) Hardcoded 51 limit on titles is too limiting X-Git-Tag: 1.31.0-rc.0~47874 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=8f98402e5123acbe8f5b04588facbf8ca4aeb705;p=lhc%2Fweb%2Fwiklou.git * (bug 13965) Hardcoded 51 limit on titles is too limiting --- 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) {