renamed plugin install menu class

This commit is contained in:
Steffen Schröder 2014-07-01 21:23:50 +02:00
parent 072120064f
commit a17e681ef0
4 changed files with 7 additions and 7 deletions

View File

@ -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;
}
/**

View File

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

View File

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

View File

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