CommunicationMethod SET_SERVER_OPTIONS sets the changed values also in database on call

This commit is contained in:
kremsy 2016-04-10 13:32:32 +02:00
parent 0397bd0006
commit ade276d17c
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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);
}