summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2025-02-13 23:36:55 +0100
committeremkael <emkael@tlen.pl>2025-02-13 23:50:03 +0100
commit493a93248ed6304e3ed4a0d9b465439097162b0f (patch)
treeeeea982e13e8ac3fd2c6b73d0d6b15880846fb90
parentc171b61f3f775e28ac0de926c787dd5c1c9735f4 (diff)
Properly unset all 'manual' parameters for BridgeNET type
-rw-r--r--http/api-inc.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/http/api-inc.php b/http/api-inc.php
index 36b2cd5..b33b9e0 100644
--- a/http/api-inc.php
+++ b/http/api-inc.php
@@ -552,6 +552,10 @@ class ApiPklV3 extends ApiPklV2 {
if (isset($parameters['tournament_rank'])
&& $parameters['tournament_rank'] == ApiPkl::RANK_BNET) {
$this->_check_bridgenet_parameters($parameters);
+ // BridgeNET type tournaments disregard all 'manual' parameters
+ if (isset($parameters['manual'])) {
+ unset($parameters['manual']);
+ }
}
// Validate newly introduced 'boards' parameter, if provided
if (isset($parameters['boards'])) {
@@ -573,13 +577,6 @@ class ApiPklV3 extends ApiPklV2 {
function parse_parameters($parameters) {
$return = parent::parse_parameters($parameters);
- // BridgeNET type tournaments disregard all 'manual' parameters
- if (isset($return['tournament_rank'])
- && $return['tournament_rank'] == ApiPkl::RANK_BNET) {
- if (isset($return['manual'])) {
- unset($return['manual']);
- }
- }
if (isset($parameters['boards'])) {
// 'boards' param needs to be parsed and maintained,
// as it's used in BridgeNET calculcations