diff options
author | Mate Bartus <mate.bartus@gmail.com> | 2015-07-21 15:13:54 +0200 |
---|---|---|
committer | Mate Bartus <mate.bartus@gmail.com> | 2015-07-21 15:13:54 +0200 |
commit | 3d4f21c1f87f88c6cf6efd6e3844672d7784f09f (patch) | |
tree | d48981682d54aaa51cb591b2e11e0f5217e63a12 | |
parent | 3a3dd941452eca6f487bb8ab2d21c99f89846f24 (diff) | |
download | forums-3d4f21c1f87f88c6cf6efd6e3844672d7784f09f.tar forums-3d4f21c1f87f88c6cf6efd6e3844672d7784f09f.tar.gz forums-3d4f21c1f87f88c6cf6efd6e3844672d7784f09f.tar.bz2 forums-3d4f21c1f87f88c6cf6efd6e3844672d7784f09f.tar.xz forums-3d4f21c1f87f88c6cf6efd6e3844672d7784f09f.zip |
[ticket/13740] Check navigation requirements
PHPBB3-13740
3 files changed, 30 insertions, 0 deletions
diff --git a/phpBB/config/installer/container/services_install_navigation.yml b/phpBB/config/installer/container/services_install_navigation.yml index 88c495825b..53e20e89cc 100644 --- a/phpBB/config/installer/container/services_install_navigation.yml +++ b/phpBB/config/installer/container/services_install_navigation.yml @@ -19,6 +19,8 @@ services: installer.navigation.install_navigation: class: phpbb\install\helper\navigation\install_navigation + arguments: + - @installer.helper.install_helper scope: prototype tags: - { name: installer.navigation } diff --git a/phpBB/phpbb/install/helper/navigation/install_navigation.php b/phpBB/phpbb/install/helper/navigation/install_navigation.php index 1389f11fa0..f690f8de76 100644 --- a/phpBB/phpbb/install/helper/navigation/install_navigation.php +++ b/phpBB/phpbb/install/helper/navigation/install_navigation.php @@ -13,10 +13,35 @@ namespace phpbb\install\helper\navigation; +use phpbb\install\helper\install_helper; + class install_navigation implements navigation_interface { + /** + * @var install_helper + */ + private $install_helper; + + /** + * Constructor + * + * @param install_helper $install_helper + */ + public function __construct(install_helper $install_helper) + { + $this->install_helper = $install_helper; + } + + /** + * {@inheritdoc} + */ public function get() { + if ($this->install_helper->is_phpbb_installed()) + { + return array(); + } + return array( 'install' => array( 'label' => 'INSTALL', diff --git a/phpBB/phpbb/install/helper/navigation/main_navigation.php b/phpBB/phpbb/install/helper/navigation/main_navigation.php index ad67840424..214bb04963 100644 --- a/phpBB/phpbb/install/helper/navigation/main_navigation.php +++ b/phpBB/phpbb/install/helper/navigation/main_navigation.php @@ -15,6 +15,9 @@ namespace phpbb\install\helper\navigation; class main_navigation implements navigation_interface { + /** + * {@inheritdoc} + */ public function get() { return array( |