moved plugin install menu to plugins namespace

This commit is contained in:
Steffen Schröder 2014-04-27 16:36:15 +02:00
parent 7a6566691c
commit 969933e585
4 changed files with 10 additions and 7 deletions

View File

@ -273,7 +273,6 @@ Void {$updatePageFunction}(Text _PagingId, Text _PageLabelId, Integer _BrowseAct
protected function getMinPage() {
$minPageNumber = null;
$minPage = null;
var_dump($this->pages);
foreach ($this->pages as $page) {
$pageNumber = $page->getPageNumber();
if ($minPageNumber === null || $pageNumber < $minPageNumber) {

View File

@ -1,6 +1,6 @@
<?php
namespace ManiaControl\Update;
namespace ManiaControl\Plugins;
use FML\Controls\Control;
use FML\Controls\Frame;
@ -17,7 +17,6 @@ use ManiaControl\Files\FileUtil;
use ManiaControl\ManiaControl;
use ManiaControl\Manialinks\ManialinkPageAnswerListener;
use ManiaControl\Players\Player;
use ManiaControl\Plugins\Plugin;
/**
* Configurator for enabling and disabling Plugins
@ -27,6 +26,9 @@ use ManiaControl\Plugins\Plugin;
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class PluginInstallMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAnswerListener {
/*
* Constants
*/
const SETTING_PERMISSION_INSTALL_PLUGINS = 'Install plugins';
const ACTION_PREFIX_INSTALLPLUGIN = 'PluginInstallMenu.Install.';

View File

@ -24,6 +24,7 @@ class PluginManager {
*/
private $maniaControl = null;
private $pluginMenu = null;
private $pluginInstallMenu = null;
private $activePlugins = array();
private $pluginClasses = array();
@ -38,6 +39,9 @@ class PluginManager {
$this->pluginMenu = new PluginMenu($maniaControl);
$this->maniaControl->configurator->addMenu($this->pluginMenu);
$this->pluginInstallMenu = new PluginInstallMenu($maniaControl);
$this->maniaControl->configurator->addMenu($this->pluginInstallMenu);
}
/**

View File

@ -12,6 +12,7 @@ use ManiaControl\ManiaControl;
use ManiaControl\Players\Player;
use ManiaControl\Players\PlayerManager;
use ManiaControl\Plugins\Plugin;
use ManiaControl\Plugins\PluginInstallMenu;
use ManiaControl\Plugins\PluginMenu;
/**
@ -77,9 +78,6 @@ class UpdateManager implements CallbackListener, CommandListener, TimerListener
$this->maniaControl->commandManager->registerCommandListener('pluginupdate', $this, 'handle_PluginUpdate', true);
$this->currentBuildDate = $this->getNightlyBuildDate();
$this->pluginInstallMenu = new PluginInstallMenu($maniaControl);
$this->maniaControl->configurator->addMenu($this->pluginInstallMenu);
}
/**