1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-23 16:52:54 +02:00

[ticket/11150] Disable if directories not writable

PHPBB3-11150
This commit is contained in:
Tristan Darricau
2015-09-15 14:48:21 +02:00
committed by Tristan Darricau
parent 0a809fb90e
commit cc0a762866
11 changed files with 82 additions and 16 deletions

View File

@@ -60,12 +60,14 @@ class extension_manager extends manager
* @param filesystem $filesystem Filesystem object
* @param string $package_type Composer type of managed packages
* @param string $exception_prefix Exception prefix to use
* @param string $root_path phpBB root path
* @param config $config Config object
*/
public function __construct(installer $installer, driver_interface $cache, ext_manager $extension_manager, filesystem $filesystem, $package_type, $exception_prefix, config $config = null)
public function __construct(installer $installer, driver_interface $cache, ext_manager $extension_manager, filesystem $filesystem, $package_type, $exception_prefix, $root_path, config $config = null)
{
$this->extension_manager = $extension_manager;
$this->filesystem = $filesystem;
$this->root_path = $root_path;
if ($config)
{
@@ -282,6 +284,14 @@ class extension_manager extends manager
}
}
/**
* {@inheritdoc}
*/
public function check_requirements()
{
return parent::check_requirements() && $this->filesystem->is_writable($this->root_path . 'ext/');
}
/**
* Enable the extensions when installing
*