diff --git a/application/core/Configurators/ServerSettings.php b/application/core/Configurators/ServerSettings.php index c5ecdb1a..5d7f9c40 100644 --- a/application/core/Configurators/ServerSettings.php +++ b/application/core/Configurators/ServerSettings.php @@ -125,11 +125,11 @@ class ServerSettings implements ConfiguratorMenu, CallbackListener { try { $serverOptions = ServerOptions::fromArray($savedSettings); - $success = $this->maniaControl->client->setServerOptions($serverOptions); + return $this->maniaControl->client->setServerOptions($serverOptions); } catch (ServerOptionsException $exception) { $this->maniaControl->chat->sendExceptionToAdmins($exception); } - return $success; + return false; } /** diff --git a/application/core/Plugins/PluginInstallMenu.php b/application/core/Plugins/InstallMenu.php similarity index 98% rename from application/core/Plugins/PluginInstallMenu.php rename to application/core/Plugins/InstallMenu.php index c13cff5f..abc37b18 100644 --- a/application/core/Plugins/PluginInstallMenu.php +++ b/application/core/Plugins/InstallMenu.php @@ -23,7 +23,7 @@ use ManiaControl\Utils\WebReader; * @copyright 2014 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 */ -class PluginInstallMenu implements ConfiguratorMenu, ManialinkPageAnswerListener { +class InstallMenu implements ConfiguratorMenu, ManialinkPageAnswerListener { /* * Constants */ diff --git a/application/core/Plugins/PluginManager.php b/application/core/Plugins/PluginManager.php index a642d535..64ba4f7a 100644 --- a/application/core/Plugins/PluginManager.php +++ b/application/core/Plugins/PluginManager.php @@ -46,7 +46,7 @@ class PluginManager { $this->pluginMenu = new PluginMenu($maniaControl); $this->maniaControl->configurator->addMenu($this->pluginMenu); - $this->pluginInstallMenu = new PluginInstallMenu($maniaControl); + $this->pluginInstallMenu = new InstallMenu($maniaControl); $this->maniaControl->configurator->addMenu($this->pluginInstallMenu); } diff --git a/application/core/Update/PluginUpdateManager.php b/application/core/Update/PluginUpdateManager.php index 29da80e7..e464e71c 100644 --- a/application/core/Update/PluginUpdateManager.php +++ b/application/core/Update/PluginUpdateManager.php @@ -11,7 +11,7 @@ use ManiaControl\Files\FileUtil; use ManiaControl\ManiaControl; use ManiaControl\Players\Player; use ManiaControl\Plugins\Plugin; -use ManiaControl\Plugins\PluginInstallMenu; +use ManiaControl\Plugins\InstallMenu; use ManiaControl\Plugins\PluginManager; use ManiaControl\Plugins\PluginMenu; use ManiaControl\Utils\WebReader; @@ -327,7 +327,7 @@ class PluginUpdateManager implements CallbackListener, CommandListener, TimerLis public function handleManialinkPageAnswer(array $callback) { $actionId = $callback[1][2]; $update = (strpos($actionId, PluginMenu::ACTION_PREFIX_UPDATEPLUGIN) === 0); - $install = (strpos($actionId, PluginInstallMenu::ACTION_PREFIX_INSTALL_PLUGIN) === 0); + $install = (strpos($actionId, InstallMenu::ACTION_PREFIX_INSTALL_PLUGIN) === 0); if (!$update && !$install) { return; } @@ -349,7 +349,7 @@ class PluginUpdateManager implements CallbackListener, CommandListener, TimerLis } } } else { - $pluginId = substr($actionId, strlen(PluginInstallMenu::ACTION_PREFIX_INSTALL_PLUGIN)); + $pluginId = substr($actionId, strlen(InstallMenu::ACTION_PREFIX_INSTALL_PLUGIN)); $url = ManiaControl::URL_WEBSERVICE . 'plugins/' . $pluginId; $this->maniaControl->fileReader->loadFile($url, function ($data, $error) use (&$player) {