From ade276d17c5175231e62fa32a359314c1646363e Mon Sep 17 00:00:00 2001 From: kremsy Date: Sun, 10 Apr 2016 13:32:32 +0200 Subject: [PATCH] CommunicationMethod SET_SERVER_OPTIONS sets the changed values also in database on call --- changelog.txt | 2 ++ core/Server/ServerOptionsMenu.php | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index c5f4eb4a..a7f3a319 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,8 @@ ##v0.16x### # Additions - updated mx links to https +# Changes +- CommunicationMethod SET_SERVER_OPTIONS sets the changed values also in database on call ###v0.163### #Additions diff --git a/core/Server/ServerOptionsMenu.php b/core/Server/ServerOptionsMenu.php index 76add131..994e7c87 100644 --- a/core/Server/ServerOptionsMenu.php +++ b/core/Server/ServerOptionsMenu.php @@ -368,7 +368,7 @@ class ServerOptionsMenu implements CallbackListener, ConfiguratorMenu, TimerList * @param Player $player * @return bool */ - private function applyNewServerOptions(ServerOptions $newServerOptions, Player $player) { + private function applyNewServerOptions(ServerOptions $newServerOptions, $player = null) { try { $this->maniaControl->getClient()->setServerOptions($newServerOptions); } catch (ServerOptionsException $exception) { @@ -409,8 +409,9 @@ class ServerOptionsMenu implements CallbackListener, ConfiguratorMenu, TimerList $this->fillUpMandatoryOptions($newServerOptions, $oldServerOptions); + try { - $success = $this->maniaControl->getClient()->setServerOptions($newServerOptions); + $success = $this->applyNewServerOptions($newServerOptions); } catch (ServerOptionsException $exception) { return new CommunicationAnswer($exception->getMessage(), true); }