summaryrefslogtreecommitdiff
path: root/http
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2020-05-14 01:33:23 +0200
committeremkael <emkael@tlen.pl>2020-05-14 01:33:23 +0200
commita649f90765f64392968c4d9bbe08bf9e7668c9e4 (patch)
treec45f7df2093a1d696401ad97a51309dad20974d2 /http
parenta5b1d76774850d86e41ed34e41e3c3269d4bf210 (diff)
Pass 'boards' argument through parameter checks, if present
Diffstat (limited to 'http')
-rw-r--r--http/api-inc.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/http/api-inc.php b/http/api-inc.php
index fc0d48e..67a7fd7 100644
--- a/http/api-inc.php
+++ b/http/api-inc.php
@@ -120,6 +120,9 @@ class ApiPkl {
if ($return['type'] != 2 && $this->parameters['tournament_rank'] == ApiPkl::RANK_KMP) {
throw new ParametersException('Parameter: type has incorrect value (' . $return['type'] . ') for KMP tournament');
}
+ if (isset($this->parameters['boards'])) {
+ $return['boards'] = intval($this->parameters['boards']);
+ }
$return['contestants'] = intval($this->parameters['contestants']);
$return['players'] = isset($this->parameters['players']) ? intval($this->parameters['players']) : intval($this->parameters['contestants']) * $return['type'];
$return['title_sum'] = floatval($this->parameters['title_sum']);