* (bug 13965) Hardcoded 51 limit on titles is too limiting
authorVictor Vasiliev <vasilievvv@users.mediawiki.org>
Tue, 6 May 2008 05:12:47 +0000 (05:12 +0000)
committerVictor Vasiliev <vasilievvv@users.mediawiki.org>
Tue, 6 May 2008 05:12:47 +0000 (05:12 +0000)
includes/api/ApiBase.php

index 0b496b9..325bd92 100644 (file)
@@ -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) {