1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-14 04:34:07 +02:00

[ticket/14938] Inconsistency in ext_mgr all_available vs is_available

Made is_available much more strict, in line with the checks in all_available
Refactor all_available to use is_available, saving duplicate code.
Further simplify is_available by using metadata_manager.
Make optional the template object on metadata_manager creation.

PHPBB3-14938
This commit is contained in:
javiexin
2017-02-10 00:35:23 +01:00
parent abd6bd8154
commit 7313eb54b4
2 changed files with 5 additions and 5 deletions

View File

@@ -72,11 +72,11 @@ class metadata_manager
* @param string $ext_name Name (including vendor) of the extension
* @param \phpbb\config\config $config phpBB Config instance
* @param \phpbb\extension\manager $extension_manager An instance of the phpBB extension manager
* @param \phpbb\template\template $template phpBB Template instance
* @param \phpbb\template\template $template phpBB Template instance or null
* @param \phpbb\user $user User instance
* @param string $phpbb_root_path Path to the phpbb includes directory.
*/
public function __construct($ext_name, \phpbb\config\config $config, \phpbb\extension\manager $extension_manager, \phpbb\template\template $template, \phpbb\user $user, $phpbb_root_path)
public function __construct($ext_name, \phpbb\config\config $config, \phpbb\extension\manager $extension_manager, \phpbb\template\template $template = null, \phpbb\user $user, $phpbb_root_path)
{
$this->config = $config;
$this->extension_manager = $extension_manager;