mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-05 05:55:15 +02:00
Merge pull request #5330 from rubencm/ticket/12623
[ticket/12623] Add allow_install_dir
This commit is contained in:
commit
9c55100c82
@ -3,6 +3,7 @@ imports:
|
||||
|
||||
core:
|
||||
require_dev_dependencies: true
|
||||
allow_install_dir: true
|
||||
|
||||
debug:
|
||||
exceptions: true
|
||||
|
@ -3,3 +3,4 @@ imports:
|
||||
|
||||
core:
|
||||
require_dev_dependencies: true
|
||||
allow_install_dir: true
|
||||
|
@ -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()
|
||||
|
@ -72,6 +72,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);
|
||||
|
@ -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']);
|
||||
|
||||
@ -325,7 +325,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_'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user