diff options
author | Rubén Calvo <rubencm@gmail.com> | 2018-09-01 01:09:22 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2019-05-09 18:57:10 +0200 |
commit | 432482160d55dd1f65b568abeb30f789a27a89c7 (patch) | |
tree | f8d8aebea6ac0f06aec61dc41cde9e45e5bf20aa | |
parent | 1609fa292d738e200643b098d8a94ce63b95a6b7 (diff) | |
download | forums-432482160d55dd1f65b568abeb30f789a27a89c7.tar forums-432482160d55dd1f65b568abeb30f789a27a89c7.tar.gz forums-432482160d55dd1f65b568abeb30f789a27a89c7.tar.bz2 forums-432482160d55dd1f65b568abeb30f789a27a89c7.tar.xz forums-432482160d55dd1f65b568abeb30f789a27a89c7.zip |
[ticket/12623] Add allow_install_dir
PHPBB3-12623
-rw-r--r-- | phpBB/config/development/config.yml | 1 | ||||
-rw-r--r-- | phpBB/phpbb/di/extension/container_configuration.php | 1 | ||||
-rw-r--r-- | phpBB/phpbb/di/extension/core.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/user.php | 4 |
4 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/config/development/config.yml b/phpBB/config/development/config.yml index e7c4f77242..c2c9068522 100644 --- a/phpBB/config/development/config.yml +++ b/phpBB/config/development/config.yml @@ -3,6 +3,7 @@ imports: core: require_dev_dependencies: true + allow_install_dir: true debug: exceptions: true diff --git a/phpBB/phpbb/di/extension/container_configuration.php b/phpBB/phpbb/di/extension/container_configuration.php index 971b6fb523..dfcbfbc729 100644 --- a/phpBB/phpbb/di/extension/container_configuration.php +++ b/phpBB/phpbb/di/extension/container_configuration.php @@ -31,6 +31,7 @@ class container_configuration implements ConfigurationInterface $rootNode ->children() ->booleanNode('require_dev_dependencies')->defaultValue(false)->end() + ->booleanNode('allow_install_dir')->defaultValue(false)->end() ->arrayNode('debug') ->addDefaultsIfNotSet() ->children() diff --git a/phpBB/phpbb/di/extension/core.php b/phpBB/phpbb/di/extension/core.php index 67150f0103..7b5a286b40 100644 --- a/phpBB/phpbb/di/extension/core.php +++ b/phpBB/phpbb/di/extension/core.php @@ -71,6 +71,8 @@ class core extends Extension } } + $container->setParameter('allow_install_dir', $config['allow_install_dir']); + // Set the Twig options if defined in the environment $definition = $container->getDefinition('template.twig.environment'); $twig_environment_options = $definition->getArgument(static::TWIG_OPTIONS_POSITION); diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php index 680a442930..5a06becb52 100644 --- a/phpBB/phpbb/user.php +++ b/phpBB/phpbb/user.php @@ -110,7 +110,7 @@ class user extends \phpbb\session function setup($lang_set = false, $style_id = false) { global $db, $request, $template, $config, $auth, $phpEx, $phpbb_root_path, $cache; - global $phpbb_dispatcher; + global $phpbb_dispatcher, $phpbb_container; $this->language->set_default_language($config['default_lang']); @@ -328,7 +328,7 @@ class user extends \phpbb\session // Disable board if the install/ directory is still present // For the brave development army we do not care about this, else we need to comment out this every time we develop locally - if (!defined('DEBUG') && !defined('ADMIN_START') && !defined('IN_INSTALL') && !defined('IN_LOGIN') && file_exists($phpbb_root_path . 'install') && !is_file($phpbb_root_path . 'install')) + if (!$phpbb_container->getParameter('allow_install_dir') && !defined('ADMIN_START') && !defined('IN_INSTALL') && !defined('IN_LOGIN') && file_exists($phpbb_root_path . 'install') && !is_file($phpbb_root_path . 'install')) { // Adjust the message slightly according to the permissions if ($auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_')) |