renamed plugin install menu class
This commit is contained in:
parent
072120064f
commit
a17e681ef0
@ -125,11 +125,11 @@ class ServerSettings implements ConfiguratorMenu, CallbackListener {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$serverOptions = ServerOptions::fromArray($savedSettings);
|
$serverOptions = ServerOptions::fromArray($savedSettings);
|
||||||
$success = $this->maniaControl->client->setServerOptions($serverOptions);
|
return $this->maniaControl->client->setServerOptions($serverOptions);
|
||||||
} catch (ServerOptionsException $exception) {
|
} catch (ServerOptionsException $exception) {
|
||||||
$this->maniaControl->chat->sendExceptionToAdmins($exception);
|
$this->maniaControl->chat->sendExceptionToAdmins($exception);
|
||||||
}
|
}
|
||||||
return $success;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,7 +23,7 @@ use ManiaControl\Utils\WebReader;
|
|||||||
* @copyright 2014 ManiaControl Team
|
* @copyright 2014 ManiaControl Team
|
||||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||||
*/
|
*/
|
||||||
class PluginInstallMenu implements ConfiguratorMenu, ManialinkPageAnswerListener {
|
class InstallMenu implements ConfiguratorMenu, ManialinkPageAnswerListener {
|
||||||
/*
|
/*
|
||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
@ -46,7 +46,7 @@ class PluginManager {
|
|||||||
$this->pluginMenu = new PluginMenu($maniaControl);
|
$this->pluginMenu = new PluginMenu($maniaControl);
|
||||||
$this->maniaControl->configurator->addMenu($this->pluginMenu);
|
$this->maniaControl->configurator->addMenu($this->pluginMenu);
|
||||||
|
|
||||||
$this->pluginInstallMenu = new PluginInstallMenu($maniaControl);
|
$this->pluginInstallMenu = new InstallMenu($maniaControl);
|
||||||
$this->maniaControl->configurator->addMenu($this->pluginInstallMenu);
|
$this->maniaControl->configurator->addMenu($this->pluginInstallMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ use ManiaControl\Files\FileUtil;
|
|||||||
use ManiaControl\ManiaControl;
|
use ManiaControl\ManiaControl;
|
||||||
use ManiaControl\Players\Player;
|
use ManiaControl\Players\Player;
|
||||||
use ManiaControl\Plugins\Plugin;
|
use ManiaControl\Plugins\Plugin;
|
||||||
use ManiaControl\Plugins\PluginInstallMenu;
|
use ManiaControl\Plugins\InstallMenu;
|
||||||
use ManiaControl\Plugins\PluginManager;
|
use ManiaControl\Plugins\PluginManager;
|
||||||
use ManiaControl\Plugins\PluginMenu;
|
use ManiaControl\Plugins\PluginMenu;
|
||||||
use ManiaControl\Utils\WebReader;
|
use ManiaControl\Utils\WebReader;
|
||||||
@ -327,7 +327,7 @@ class PluginUpdateManager implements CallbackListener, CommandListener, TimerLis
|
|||||||
public function handleManialinkPageAnswer(array $callback) {
|
public function handleManialinkPageAnswer(array $callback) {
|
||||||
$actionId = $callback[1][2];
|
$actionId = $callback[1][2];
|
||||||
$update = (strpos($actionId, PluginMenu::ACTION_PREFIX_UPDATEPLUGIN) === 0);
|
$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) {
|
if (!$update && !$install) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -349,7 +349,7 @@ class PluginUpdateManager implements CallbackListener, CommandListener, TimerLis
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} 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;
|
$url = ManiaControl::URL_WEBSERVICE . 'plugins/' . $pluginId;
|
||||||
$this->maniaControl->fileReader->loadFile($url, function ($data, $error) use (&$player) {
|
$this->maniaControl->fileReader->loadFile($url, function ($data, $error) use (&$player) {
|
||||||
|
Loading…
Reference in New Issue
Block a user