mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/11150] Add comments + ignore invaid repositories URLs
PHPBB3-11150
This commit is contained in:
parent
fbf11d61aa
commit
d59b26dcec
4 changed files with 26 additions and 5 deletions
|
@ -7,7 +7,7 @@
|
||||||
<p>{{ lang( 'EXTENSIONS_CATALOG_EXPLAIN') }}</p>
|
<p>{{ lang( 'EXTENSIONS_CATALOG_EXPLAIN') }}</p>
|
||||||
|
|
||||||
<fieldset class="quick quick-left">
|
<fieldset class="quick quick-left">
|
||||||
<span class="small"><a href="https://www.phpbb.com/go/customise/extensions/3.1" target="_blank">{{ lang('BROWSE_EXTENSIONS_DATABASE') }}</a> • <a href="javascript:phpbb.toggleDisplay('catalog_settings');">{{ lang('SETTINGS') }}</a></span>
|
<span class="small"><a href="https://www.phpbb.com/go/customise/extensions/3.2" target="_blank">{{ lang('BROWSE_EXTENSIONS_DATABASE') }}</a> • <a href="javascript:phpbb.toggleDisplay('catalog_settings');">{{ lang('SETTINGS') }}</a></span>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
{% if pagination is defined %}
|
{% if pagination is defined %}
|
||||||
|
|
|
@ -416,6 +416,12 @@ class acp_extensions
|
||||||
$this->tpl_name = $tpl_name;
|
$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)
|
public function catalog_mode($id, $mode)
|
||||||
{
|
{
|
||||||
global $phpbb_container;
|
global $phpbb_container;
|
||||||
|
|
|
@ -599,10 +599,13 @@ class installer
|
||||||
|
|
||||||
foreach ($this->repositories as $repository)
|
foreach ($this->repositories as $repository)
|
||||||
{
|
{
|
||||||
$repositories[] = [
|
if (preg_match('#^' . get_preg_expression('url') . '$#iu', $repository))
|
||||||
'type' => 'composer',
|
{
|
||||||
'url' => $repository,
|
$repositories[] = [
|
||||||
];
|
'type' => 'composer',
|
||||||
|
'url' => $repository,
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $repositories;
|
return $repositories;
|
||||||
|
|
|
@ -291,6 +291,18 @@ class manager implements manager_interface
|
||||||
return $this->installer->check_requirements();
|
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)
|
protected function normalize_version(array $packages)
|
||||||
{
|
{
|
||||||
$normalized_packages = [];
|
$normalized_packages = [];
|
||||||
|
|
Loading…
Add table
Reference in a new issue