diff --git a/phpBB/adm/style/acp_ext_catalog.html b/phpBB/adm/style/acp_ext_catalog.html index 84839adf9c..787b620e62 100644 --- a/phpBB/adm/style/acp_ext_catalog.html +++ b/phpBB/adm/style/acp_ext_catalog.html @@ -7,7 +7,7 @@

{{ lang( 'EXTENSIONS_CATALOG_EXPLAIN') }}

- {{ lang('BROWSE_EXTENSIONS_DATABASE') }}{{ lang('SETTINGS') }} + {{ lang('BROWSE_EXTENSIONS_DATABASE') }}{{ lang('SETTINGS') }}
{% if pagination is defined %} diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php index eda3bace35..9225ae9f27 100644 --- a/phpBB/includes/acp/acp_extensions.php +++ b/phpBB/includes/acp/acp_extensions.php @@ -416,6 +416,12 @@ class acp_extensions $this->tpl_name = $tpl_name; } + /** + * Handles the catalog mode of the extensions list + * + * @param string $id + * @param string $mode + */ public function catalog_mode($id, $mode) { global $phpbb_container; diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php index b3933954f9..f6f2f1c83a 100644 --- a/phpBB/phpbb/composer/installer.php +++ b/phpBB/phpbb/composer/installer.php @@ -599,10 +599,13 @@ class installer foreach ($this->repositories as $repository) { - $repositories[] = [ - 'type' => 'composer', - 'url' => $repository, - ]; + if (preg_match('#^' . get_preg_expression('url') . '$#iu', $repository)) + { + $repositories[] = [ + 'type' => 'composer', + 'url' => $repository, + ]; + } } return $repositories; diff --git a/phpBB/phpbb/composer/manager.php b/phpBB/phpbb/composer/manager.php index db2f713509..b75bcad3d7 100644 --- a/phpBB/phpbb/composer/manager.php +++ b/phpBB/phpbb/composer/manager.php @@ -291,6 +291,18 @@ class manager implements manager_interface return $this->installer->check_requirements(); } + /** + * Normalize a packages/version array. Every entry can have 3 different forms: + * - $package => $version + * - $indice => $package:$version + * - $indice => $package + * They are converted to he form: + * - $package => $version ($version is set to '*' for the third form) + * + * @param array $packages + * + * @return array + */ protected function normalize_version(array $packages) { $normalized_packages = [];