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() { protected function getMinPage() {
$minPageNumber = null; $minPageNumber = null;
$minPage = null; $minPage = null;
var_dump($this->pages);
foreach ($this->pages as $page) { foreach ($this->pages as $page) {
$pageNumber = $page->getPageNumber(); $pageNumber = $page->getPageNumber();
if ($minPageNumber === null || $pageNumber < $minPageNumber) { if ($minPageNumber === null || $pageNumber < $minPageNumber) {

View File

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

View File

@ -23,7 +23,8 @@ class PluginManager {
* Private Properties * Private Properties
*/ */
private $maniaControl = null; private $maniaControl = null;
private $pluginMenu = null; private $pluginMenu = null;
private $pluginInstallMenu = null;
private $activePlugins = array(); private $activePlugins = array();
private $pluginClasses = array(); private $pluginClasses = array();
@ -38,6 +39,9 @@ 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->maniaControl->configurator->addMenu($this->pluginInstallMenu);
} }
/** /**

View File

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