Update PluginUpdateManager.php to partly fix issue #177 (#180)

This update partly fixes the issue https://github.com/ManiaControl/ManiaControl/issues/177 in the plugin installation case.
This commit is contained in:
axelalex2 2018-06-05 20:47:51 +02:00 committed by Lukas Kremsmayr
parent f39b14ba61
commit 0ab36b6fd3

View File

@ -240,6 +240,12 @@ class PluginUpdateManager implements CallbackListener, CommandListener, TimerLis
* @param bool $update * @param bool $update
*/ */
private function installPlugin(PluginUpdateData $pluginUpdateData, Player $player = null, $update = false) { private function installPlugin(PluginUpdateData $pluginUpdateData, Player $player = null, $update = false) {
if ($player && !$this->maniaControl->getAuthenticationManager()->checkPermission($player, InstallMenu::SETTING_PERMISSION_INSTALL_PLUGINS))
{
$this->maniaControl->getAuthenticationManager()->sendNotAllowed($player);
return;
}
if (ManiaControl::VERSION < $pluginUpdateData->minManiaControlVersion) { if (ManiaControl::VERSION < $pluginUpdateData->minManiaControlVersion) {
$message = "Your ManiaControl Version v" . ManiaControl::VERSION . " is too old for this Plugin (min Required Version): ' . {$pluginUpdateData->minManiaControlVersion}!"; $message = "Your ManiaControl Version v" . ManiaControl::VERSION . " is too old for this Plugin (min Required Version): ' . {$pluginUpdateData->minManiaControlVersion}!";
if ($player) { if ($player) {