- {{ extension.name }}
+ {{ extension.display_name }}
{{ lang('HOMEPAGE') }} •
{% if extension.name in managed_extensions %}
diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php
index 18e1b6e83b9..1ba3ed42a2f 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -365,6 +365,7 @@ protected function do_get_available_packages($type)
// Generates the entry
$available[$name] = [];
$available[$name]['name'] = $highest_version->getPrettyName();
+ $available[$name]['display_name'] = $highest_version->getExtra()['display-name'];
$available[$name]['composer_name'] = $highest_version->getName();
$available[$name]['version'] = $highest_version->getPrettyVersion();
From c12cfdad9d20b1c4f5ee7b1a71ac6643c966ada1 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Mon, 14 Sep 2015 18:59:00 +0200
Subject: [PATCH 127/431] [ticket/11150] Move actions to a dedicated collumn in
the gallery
PHPBB3-11150
---
phpBB/adm/style/acp_ext_gallery.html | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/phpBB/adm/style/acp_ext_gallery.html b/phpBB/adm/style/acp_ext_gallery.html
index 5b9916bf7c7..50057f1c4f1 100644
--- a/phpBB/adm/style/acp_ext_gallery.html
+++ b/phpBB/adm/style/acp_ext_gallery.html
@@ -32,12 +32,13 @@ {{lang( 'EXTENSIONS_ADMIN') }}
-
+
{{ lang("EXTENSION_NAME") }}
- {{ lang("VERSION") }}
+ {{ lang("VERSION") }}
{{ lang("DESCRIPTION") }}
+ {{ lang("EXTENSION_ACTIONS") }}
@@ -46,18 +47,20 @@ {{lang( 'EXTENSIONS_ADMIN') }}
{{ extension.display_name }}
- {{ lang('HOMEPAGE') }} •
- {% if extension.name in managed_extensions %}
- {{ lang('INSTALLED') }}
- {% elseif extension.name in installed_extensions -%}
- {{ lang('INSTALLED_MANUALLY') }} ({{ lang('MANAGE') }} )
- {% else -%}
- {{ lang('INSTALL') }}
- {%- endif -%}
+ {{ lang('HOMEPAGE') }}
- {{ extension.version }}
+ {{ extension.version }}
{{ extension.description }}
+
+ {% if extension.name in managed_extensions %}
+ {{ lang('INSTALLED') }}
+ {% elseif extension.name in installed_extensions -%}
+ {{ lang('INSTALLED_MANUALLY') }} ({{ lang('MANAGE') }} )
+ {% else -%}
+ {{ lang('INSTALL') }}
+ {%- endif -%}
+
{% endfor %}
From f6a867af5f205a25e70068aa7e6573d332ff818b Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Mon, 14 Sep 2015 19:05:04 +0200
Subject: [PATCH 128/431] [ticket/11150] Move homepage and display package name
PHPBB3-11150
---
phpBB/adm/style/acp_ext_gallery.html | 10 +++++-----
phpBB/adm/style/acp_ext_list.html | 1 +
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/phpBB/adm/style/acp_ext_gallery.html b/phpBB/adm/style/acp_ext_gallery.html
index 50057f1c4f1..6003875f5e2 100644
--- a/phpBB/adm/style/acp_ext_gallery.html
+++ b/phpBB/adm/style/acp_ext_gallery.html
@@ -46,15 +46,15 @@ {{lang( 'EXTENSIONS_ADMIN') }}
{{ extension.display_name }}
-
- {{ lang('HOMEPAGE') }}
-
+ {{ extension.name }}
{{ extension.version }}
- {{ extension.description }}
+ {{ extension.description }} • {{ lang('HOMEPAGE') }}
{% if extension.name in managed_extensions %}
- {{ lang('INSTALLED') }}
+ {{ lang('INSTALLED') }}
+ ({{ lang('UPDATE') }}
+ • {{ lang('REMOVE') }} )
{% elseif extension.name in installed_extensions -%}
{{ lang('INSTALLED_MANUALLY') }} ({{ lang('MANAGE') }} )
{% else -%}
diff --git a/phpBB/adm/style/acp_ext_list.html b/phpBB/adm/style/acp_ext_list.html
index 80163684c15..da7c58591fd 100644
--- a/phpBB/adm/style/acp_ext_list.html
+++ b/phpBB/adm/style/acp_ext_list.html
@@ -66,6 +66,7 @@ {L_EXTENSIONS_ADMIN}
|
{L_UPDATE}
+ | {L_REMOVE}
From bf5462e7083339dbbf9e085289c277e31d7a1c82 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Mon, 14 Sep 2015 19:06:49 +0200
Subject: [PATCH 129/431] [ticket/11150] Resizes some columns
PHPBB3-11150
---
phpBB/adm/style/acp_ext_gallery.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/phpBB/adm/style/acp_ext_gallery.html b/phpBB/adm/style/acp_ext_gallery.html
index 6003875f5e2..5bf3e295c8c 100644
--- a/phpBB/adm/style/acp_ext_gallery.html
+++ b/phpBB/adm/style/acp_ext_gallery.html
@@ -35,10 +35,10 @@ {{lang( 'EXTENSIONS_ADMIN') }}
- {{ lang("EXTENSION_NAME") }}
+ {{ lang("EXTENSION_NAME") }}
{{ lang("VERSION") }}
{{ lang("DESCRIPTION") }}
- {{ lang("EXTENSION_ACTIONS") }}
+ {{ lang("EXTENSION_ACTIONS") }}
From 8db408a21c2b1a0eb466ba8a7bfc251be8c3d8c4 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Mon, 14 Sep 2015 19:11:52 +0200
Subject: [PATCH 130/431] [ticket/11150] Resize actions column
PHPBB3-11150
---
phpBB/adm/style/acp_ext_gallery.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/phpBB/adm/style/acp_ext_gallery.html b/phpBB/adm/style/acp_ext_gallery.html
index 5bf3e295c8c..eaf57ac284a 100644
--- a/phpBB/adm/style/acp_ext_gallery.html
+++ b/phpBB/adm/style/acp_ext_gallery.html
@@ -38,7 +38,7 @@ {{lang( 'EXTENSIONS_ADMIN') }}
{{ lang("EXTENSION_NAME") }}
{{ lang("VERSION") }}
{{ lang("DESCRIPTION") }}
- {{ lang("EXTENSION_ACTIONS") }}
+ {{ lang("EXTENSION_ACTIONS") }}
@@ -46,7 +46,7 @@ {{lang( 'EXTENSIONS_ADMIN') }}
{{ extension.display_name }}
- {{ extension.name }}
+ {{ extension.name }}
{{ extension.version }}
{{ extension.description }} • {{ lang('HOMEPAGE') }}
From 3a1f2ad3ff8a0aa5fcdfba43d8c963d29c77d3ed Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Mon, 14 Sep 2015 19:49:15 +0200
Subject: [PATCH 131/431] [ticket/11150] Sorts extensions by display name
PHPBB3-11150
---
phpBB/phpbb/composer/installer.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php
index 1ba3ed42a2f..ab1af35525a 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -383,7 +383,10 @@ protected function do_get_available_packages($type)
}
}
- ksort($available);
+ usort($available, function($a, $b)
+ {
+ return strcmp($a['display_name'], $b['display_name']);
+ });
return $available;
}
From 3d363a7bb3ae8f76b352a095e1cdbff83dfd3d4f Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Mon, 14 Sep 2015 23:27:10 +0200
Subject: [PATCH 132/431] [ticket/11150] Gallery pagination
PHPBB3-11150
---
phpBB/adm/style/acp_ext_gallery.html | 99 +++++++++++++++------------
phpBB/adm/style/admin.css | 10 +++
phpBB/includes/acp/acp_extensions.php | 14 +++-
3 files changed, 78 insertions(+), 45 deletions(-)
diff --git a/phpBB/adm/style/acp_ext_gallery.html b/phpBB/adm/style/acp_ext_gallery.html
index eaf57ac284a..4a435f48385 100644
--- a/phpBB/adm/style/acp_ext_gallery.html
+++ b/phpBB/adm/style/acp_ext_gallery.html
@@ -1,18 +1,23 @@
-
+{% include('overall_header.html') %}
- {{lang( 'EXTENSIONS_ADMIN') }}
+{{lang( 'EXTENSIONS_ADMIN') }}
- {{lang( 'EXTENSIONS_EXPLAIN') }}
+{{lang( 'EXTENSIONS_EXPLAIN') }}
-
- {{ lang('BROWSE_EXTENSIONS_DATABASE') }} • {{ lang('SETTINGS') }}
-
+
+ {{ lang('BROWSE_EXTENSIONS_DATABASE') }} • {{ lang('SETTINGS') }}
+
-
+
+
+
+
+
+ {{ lang("EXTENSION_NAME") }}
+ {{ lang("VERSION") }}
+ {{ lang("DESCRIPTION") }}
+ {{ lang("EXTENSION_ACTIONS") }}
+
+
+
+{% for extension in extensions %}
+
+
+ {{ extension.display_name }}
+ {{ extension.name }}
+
+ {{ extension.version }}
+ {{ extension.description }} • {{ lang('HOMEPAGE') }}
+
+ {% if extension.name in managed_extensions %}
+ {{ lang('INSTALLED') }}
+ ({{ lang('UPDATE') }}
+ • {{ lang('REMOVE') }} )
+ {% elseif extension.name in installed_extensions -%}
+ {{ lang('INSTALLED_MANUALLY') }} ({{ lang('MANAGE') }} )
+ {% else -%}
+ {{ lang('INSTALL') }}
+ {%- endif -%}
+
+
+{% endfor %}
+
+
-
-
-
-
- {{ lang("EXTENSION_NAME") }}
- {{ lang("VERSION") }}
- {{ lang("DESCRIPTION") }}
- {{ lang("EXTENSION_ACTIONS") }}
-
-
-
- {% for extension in extensions %}
-
-
- {{ extension.display_name }}
- {{ extension.name }}
-
- {{ extension.version }}
- {{ extension.description }} • {{ lang('HOMEPAGE') }}
-
- {% if extension.name in managed_extensions %}
- {{ lang('INSTALLED') }}
- ({{ lang('UPDATE') }}
- • {{ lang('REMOVE') }} )
- {% elseif extension.name in installed_extensions -%}
- {{ lang('INSTALLED_MANUALLY') }} ({{ lang('MANAGE') }} )
- {% else -%}
- {{ lang('INSTALL') }}
- {%- endif -%}
-
-
- {% endfor %}
-
-
+{% if pagination is defined %}
+
+{% endif %}
-
+{% include('overall_footer.html') %}
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index f81dd35531a..290fee2983e 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -1333,6 +1333,16 @@ p.quick {
text-align: left;
}
+fieldset.quick-left, p.quick-left {
+ margin: 15px 0 5px 0;
+ padding: 0 0px 0;
+ float: left;
+}
+
+.rtl fieldset.quick-left, .rtl p.quick-left {
+ float: right;
+}
+
fieldset.quick legend {
display: none;
}
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index bcb057ddb94..8c144b09fc3 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -576,11 +576,23 @@ public function gallery_mode($id, $mode)
default:
/** @var \phpbb\composer\extension_manager $manager */
$manager = $phpbb_container->get('ext.composer.manager');
+
+ /** @var \phpbb\pagination $pagination */
+ $pagination = $phpbb_container->get('pagination');
+
+ $start = $this->request->variable('start', 0);
+ $base_url = $this->u_action;
+
+ $available_extensions = $manager->get_available_packages();
+ $extensions = array_slice($available_extensions, $start, 20);
+
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', count($available_extensions), 20, $start);
+
$this->page_title = 'ACP_EXTENSIONS_GALLERY';
$this->tpl_name = 'acp_ext_gallery';
$this->request->enable_super_globals();
- $this->template->assign_var('extensions', $manager->get_available_packages());
+ $this->template->assign_var('extensions', $extensions);
$this->template->assign_var('managed_extensions', array_keys($manager->get_managed_packages()));
$this->template->assign_var('installed_extensions', array_keys($extensions_manager->all_available()));
$this->template->assign_var('U_ACTION', $this->u_action);
From 3640302afd27f1e7dab08592f28ded507c1d7cbe Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Tue, 15 Sep 2015 10:54:38 +0200
Subject: [PATCH 133/431] [ticket/11150] Set settings
PHPBB3-11150
---
phpBB/adm/style/acp_ext_gallery.html | 24 ++++++++--
phpBB/adm/style/acp_ext_list.html | 2 +-
phpBB/includes/acp/acp_extensions.php | 47 +++++++++++++++++++
phpBB/language/en/acp/extensions.php | 6 +++
.../data/v320/extensions_composer.php | 2 +
5 files changed, 77 insertions(+), 4 deletions(-)
diff --git a/phpBB/adm/style/acp_ext_gallery.html b/phpBB/adm/style/acp_ext_gallery.html
index 4a435f48385..72ec92785cf 100644
--- a/phpBB/adm/style/acp_ext_gallery.html
+++ b/phpBB/adm/style/acp_ext_gallery.html
@@ -20,10 +20,28 @@ {{lang( 'EXTENSIONS_ADMIN') }}
{{ lang('EXTENSIONS_GALLERY_SETTINGS') }}
- {L_FORCE_UNSTABLE}{L_COLON}
+ {{ lang('ENABLE_ON_INSTALL') }}{{ lang('COLON') }}
- checked="checked" /> {L_YES}
- checked="checked" /> {L_NO}
+ {{ lang('YES') }}
+ {{ lang('NO') }}
+
+
+
+ {{ lang('PURGE_ON_REMOVE') }}{{ lang('COLON') }}
+
+ {{ lang('YES') }}
+ {{ lang('NO') }}
+
+
+
+
+ {{ lang('ENABLE_PACKAGIST') }}{{ lang('COLON') }}
+
+ {{ lang('WARNING') }}{{ lang('COLON') }} {{ lang('ENABLE_PACKAGIST_DETAIL') }}
+
+
+ {{ lang('YES') }}
+ {{ lang('NO') }}
diff --git a/phpBB/adm/style/acp_ext_list.html b/phpBB/adm/style/acp_ext_list.html
index da7c58591fd..0ab620b864c 100644
--- a/phpBB/adm/style/acp_ext_list.html
+++ b/phpBB/adm/style/acp_ext_list.html
@@ -7,7 +7,7 @@ {L_EXTENSIONS_ADMIN}
{L_EXTENSIONS_EXPLAIN}
- {L_BROWSE_EXTENSIONS_DATABASE} • {L_VERSIONCHECK_FORCE_UPDATE_ALL} • {L_SETTINGS}
+ {L_VERSIONCHECK_FORCE_UPDATE_ALL} • {L_SETTINGS}
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 8c144b09fc3..c12348a0205 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -29,6 +29,8 @@ class acp_extensions
var $page_title;
private $db;
+
+ /** @var phpbb\config\config */
private $config;
private $template;
private $user;
@@ -574,6 +576,42 @@ public function gallery_mode($id, $mode)
break;
case 'list':
default:
+ if ($this->request->is_set('enable_packagist') && confirm_box(true))
+ {
+ $this->config->set('exts_composer_packagist', true);
+ trigger_error($language->lang('CONFIG_UPDATED') . adm_back_link($this->u_action));
+ }
+
+ $submit = $this->request->is_set('update');
+ if ($submit)
+ {
+ if (!check_form_key('gallery_settings'))
+ {
+ trigger_error($language->lang('FORM_INVALID') . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $enable_packagist = $this->request->variable('enable_packagist', false);
+ $enable_on_install = $this->request->variable('enable_on_install', false);
+ $purge_on_remove = $this->request->variable('purge_on_remove', false);
+ //$repositories = $this->request->variable('repositories', []);
+
+ $this->config->set('exts_composer_enable_on_install', $enable_on_install);
+ $this->config->set('exts_composer_purge_on_remove', $purge_on_remove);
+ if ($enable_packagist)
+ {
+ $s_hidden_fields = build_hidden_fields(array(
+ 'enable_packagist' => $enable_packagist
+ ));
+
+ confirm_box(false, $language->lang('ENABLE_PACKAGIST_CONFIRM'), $s_hidden_fields);
+ }
+ else
+ {
+ $this->config->set('exts_composer_packagist', $enable_packagist);
+ trigger_error($language->lang('CONFIG_UPDATED') . adm_back_link($this->u_action));
+ }
+ }
+
/** @var \phpbb\composer\extension_manager $manager */
$manager = $phpbb_container->get('ext.composer.manager');
@@ -596,7 +634,16 @@ public function gallery_mode($id, $mode)
$this->template->assign_var('managed_extensions', array_keys($manager->get_managed_packages()));
$this->template->assign_var('installed_extensions', array_keys($extensions_manager->all_available()));
$this->template->assign_var('U_ACTION', $this->u_action);
+ $this->template->assign_var('settings', [
+ 'enable_packagist' => $this->config['exts_composer_packagist'],
+ 'enable_on_install' => $this->config['exts_composer_enable_on_install'],
+ 'purge_on_remove' => $this->config['exts_composer_purge_on_remove'],
+ 'repositories' => unserialize($this->config['exts_composer_repositories']),
+ ]);
$this->request->disable_super_globals();
+
+ add_form_key('gallery_settings');
+
break;
}
}
diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php
index 30d20839fd1..f4ab2bf469f 100644
--- a/phpBB/language/en/acp/extensions.php
+++ b/phpBB/language/en/acp/extensions.php
@@ -143,4 +143,10 @@
'META_FIELD_NOT_SET' => 'Required meta field %s has not been set.',
'META_FIELD_INVALID' => 'Meta field %s is invalid.',
+
+ 'EXTENSIONS_GALLERY_SETTINGS' => 'Extensions gallery settings',
+ 'ENABLE_ON_INSTALL' => 'Enable extensions when installing',
+ 'PURGE_ON_REMOVE' => 'Purge extensions when removing',
+ 'ENABLE_PACKAGIST' => 'Enable Packagist usage',
+ 'ENABLE_PACKAGIST_DETAIL' => 'TODO text explaining why packagist shouldn\'t be enabled, dev usage, etc...',
));
diff --git a/phpBB/phpbb/db/migration/data/v320/extensions_composer.php b/phpBB/phpbb/db/migration/data/v320/extensions_composer.php
index 1271adb3589..976dcfaa3ec 100644
--- a/phpBB/phpbb/db/migration/data/v320/extensions_composer.php
+++ b/phpBB/phpbb/db/migration/data/v320/extensions_composer.php
@@ -22,6 +22,8 @@ public function update_data()
array('config.add', array('exts_composer_packagist', true)),
array('config.add', array('exts_composer_json_file', 'composer-ext.json')),
array('config.add', array('exts_composer_vendor_dir', 'vendor-ext/')),
+ array('config.add', array('exts_composer_enable_on_install', false)),
+ array('config.add', array('exts_composer_purge_on_remove', false)),
array('module.add', array(
'acp',
'ACP_EXTENSION_MANAGEMENT',
From b75087a4333f7c59e812f0e88709f2f7339c5d90 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Tue, 15 Sep 2015 11:00:53 +0200
Subject: [PATCH 134/431] [ticket/11150] Repositories settings, beginning
PHPBB3-11150
---
phpBB/adm/style/acp_ext_gallery.html | 16 ++++++++++++++--
phpBB/includes/acp/acp_extensions.php | 2 +-
phpBB/language/en/acp/extensions.php | 2 +-
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/phpBB/adm/style/acp_ext_gallery.html b/phpBB/adm/style/acp_ext_gallery.html
index 72ec92785cf..fc641a8b230 100644
--- a/phpBB/adm/style/acp_ext_gallery.html
+++ b/phpBB/adm/style/acp_ext_gallery.html
@@ -33,12 +33,24 @@ {{lang( 'EXTENSIONS_ADMIN') }}
{{ lang('NO') }}
+
+
+ {{ lang('COMPOSER_REPOSITORIES') }}{{ lang('COLON') }}
+
+ {{ lang('COMPOSER_REPOSITORIES_EXPLAIN') }}
+
+
+
+ {{ settings.repositories|join('\n') }}
+
+
{{ lang('ENABLE_PACKAGIST') }}{{ lang('COLON') }}
- {{ lang('WARNING') }}{{ lang('COLON') }} {{ lang('ENABLE_PACKAGIST_DETAIL') }}
-
+ {{ lang('WARNING') }}{{ lang('COLON') }} {{ lang('ENABLE_PACKAGIST_EXPLAIN') }}
+
+
{{ lang('YES') }}
{{ lang('NO') }}
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index c12348a0205..145d1c20a91 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -638,7 +638,7 @@ public function gallery_mode($id, $mode)
'enable_packagist' => $this->config['exts_composer_packagist'],
'enable_on_install' => $this->config['exts_composer_enable_on_install'],
'purge_on_remove' => $this->config['exts_composer_purge_on_remove'],
- 'repositories' => unserialize($this->config['exts_composer_repositories']),
+ 'repositories' => ['a', 'b', 'c'],//unserialize($this->config['exts_composer_repositories']),
]);
$this->request->disable_super_globals();
diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php
index f4ab2bf469f..9d669a7587f 100644
--- a/phpBB/language/en/acp/extensions.php
+++ b/phpBB/language/en/acp/extensions.php
@@ -148,5 +148,5 @@
'ENABLE_ON_INSTALL' => 'Enable extensions when installing',
'PURGE_ON_REMOVE' => 'Purge extensions when removing',
'ENABLE_PACKAGIST' => 'Enable Packagist usage',
- 'ENABLE_PACKAGIST_DETAIL' => 'TODO text explaining why packagist shouldn\'t be enabled, dev usage, etc...',
+ 'ENABLE_PACKAGIST_EXPLAIN' => 'TODO text explaining why packagist shouldn\'t be enabled, dev usage, etc...',
));
From 8f1d254191b94f6e65bdee92aefd608d25eb6dd6 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Tue, 15 Sep 2015 11:57:09 +0200
Subject: [PATCH 135/431] [ticket/11150] Repositories settings - end
PHPBB3-11150
---
phpBB/adm/style/acp_ext_gallery.html | 2 +-
phpBB/includes/acp/acp_extensions.php | 9 +++++----
phpBB/phpbb/composer/installer.php | 3 ---
3 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/phpBB/adm/style/acp_ext_gallery.html b/phpBB/adm/style/acp_ext_gallery.html
index fc641a8b230..b2ef0332889 100644
--- a/phpBB/adm/style/acp_ext_gallery.html
+++ b/phpBB/adm/style/acp_ext_gallery.html
@@ -35,7 +35,7 @@ {{lang( 'EXTENSIONS_ADMIN') }}
- {{ lang('COMPOSER_REPOSITORIES') }}{{ lang('COLON') }}
+ {{ lang('COMPOSER_REPOSITORIES') }}{{ lang('COLON') }}
{{ lang('COMPOSER_REPOSITORIES_EXPLAIN') }}
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 145d1c20a91..bbb27159b14 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -576,7 +576,7 @@ public function gallery_mode($id, $mode)
break;
case 'list':
default:
- if ($this->request->is_set('enable_packagist') && confirm_box(true))
+ if (!$this->config['exts_composer_packagist'] && $this->request->is_set('enable_packagist') && confirm_box(true))
{
$this->config->set('exts_composer_packagist', true);
trigger_error($language->lang('CONFIG_UPDATED') . adm_back_link($this->u_action));
@@ -593,11 +593,12 @@ public function gallery_mode($id, $mode)
$enable_packagist = $this->request->variable('enable_packagist', false);
$enable_on_install = $this->request->variable('enable_on_install', false);
$purge_on_remove = $this->request->variable('purge_on_remove', false);
- //$repositories = $this->request->variable('repositories', []);
+ $repositories = array_unique(explode("\n", $this->request->variable('repositories', '')));
$this->config->set('exts_composer_enable_on_install', $enable_on_install);
$this->config->set('exts_composer_purge_on_remove', $purge_on_remove);
- if ($enable_packagist)
+ $this->config->set('exts_composer_repositories', serialize($repositories));
+ if (!$this->config['exts_composer_packagist'] && $enable_packagist)
{
$s_hidden_fields = build_hidden_fields(array(
'enable_packagist' => $enable_packagist
@@ -638,7 +639,7 @@ public function gallery_mode($id, $mode)
'enable_packagist' => $this->config['exts_composer_packagist'],
'enable_on_install' => $this->config['exts_composer_enable_on_install'],
'purge_on_remove' => $this->config['exts_composer_purge_on_remove'],
- 'repositories' => ['a', 'b', 'c'],//unserialize($this->config['exts_composer_repositories']),
+ 'repositories' => unserialize($this->config['exts_composer_repositories']),
]);
$this->request->disable_super_globals();
diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php
index ab1af35525a..1640c334f0a 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -83,9 +83,6 @@ public function __construct($root_path, config $config = null)
$this->packages_vendor_dir = $config['exts_composer_vendor_dir'];
}
- $this->repositories = [/*'http://phpbb.local/ext/phpbb/titania/composer/'*/];
- $this->packagist = true;
-
$this->root_path = $root_path;
}
From 46972aa4c7647e176bc1b7e051054cb8eb5ded43 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Tue, 15 Sep 2015 12:33:19 +0200
Subject: [PATCH 136/431] [ticket/11150] Enforce enable on install and purge on
remove options
PHPBB3-11150
---
phpBB/includes/acp/acp_extensions.php | 1 +
phpBB/phpbb/composer/extension_manager.php | 84 ++++++++++++++++++-
phpBB/phpbb/composer/installer.php | 6 +-
.../console/command/extension/install.php | 25 ++++--
.../command/extension/list_available.php | 2 +
.../console/command/extension/remove.php | 25 ++++--
6 files changed, 125 insertions(+), 18 deletions(-)
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index bbb27159b14..eec896cbfe1 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -598,6 +598,7 @@ public function gallery_mode($id, $mode)
$this->config->set('exts_composer_enable_on_install', $enable_on_install);
$this->config->set('exts_composer_purge_on_remove', $purge_on_remove);
$this->config->set('exts_composer_repositories', serialize($repositories));
+
if (!$this->config['exts_composer_packagist'] && $enable_packagist)
{
$s_hidden_fields = build_hidden_fields(array(
diff --git a/phpBB/phpbb/composer/extension_manager.php b/phpBB/phpbb/composer/extension_manager.php
index d877d286766..8b2388e6939 100644
--- a/phpBB/phpbb/composer/extension_manager.php
+++ b/phpBB/phpbb/composer/extension_manager.php
@@ -17,8 +17,8 @@
use phpbb\cache\driver\driver_interface;
use phpbb\composer\exception\managed_with_clean_error_exception;
use phpbb\composer\exception\managed_with_enable_error_exception;
-use phpbb\composer\exception\managed_with_error_exception;
use phpbb\composer\exception\runtime_exception;
+use phpbb\config\config;
use phpbb\extension\manager as ext_manager;
use phpbb\filesystem\exception\filesystem_exception;
use phpbb\filesystem\filesystem;
@@ -43,6 +43,16 @@ class extension_manager extends manager
*/
private $enabled_extensions;
+ /**
+ * @var bool Enables extensions when installing them?
+ */
+ private $enable_on_install = false;
+
+ /**
+ * @var bool Purges extensions data when removing them?
+ */
+ private $purge_on_remove = false;
+
/**
* @param installer $installer Installer object
* @param driver_interface $cache Cache object
@@ -50,12 +60,19 @@ 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 config $config Config object
*/
- public function __construct(installer $installer, driver_interface $cache, ext_manager $extension_manager, filesystem $filesystem, $package_type, $exception_prefix)
+ public function __construct(installer $installer, driver_interface $cache, ext_manager $extension_manager, filesystem $filesystem, $package_type, $exception_prefix, config $config = null)
{
$this->extension_manager = $extension_manager;
$this->filesystem = $filesystem;
+ if ($config)
+ {
+ $this->enable_on_install = (bool) $config['exts_composer_enable_on_install'];
+ $this->purge_on_remove = (bool) $config['exts_composer_purge_on_remove'];
+ }
+
parent::__construct($installer, $cache, $package_type, $exception_prefix);
}
@@ -71,6 +88,32 @@ public function pre_install(array $packages, IOInterface $io = null)
}
}
+ /**
+ * {@inheritdoc}
+ */
+ public function post_install(array $packages, IOInterface $io = null)
+ {
+ if ($this->enable_on_install)
+ {
+ $io->writeError('ENABLING_EXTENSIONS', true, 1);
+ foreach ($packages as $package)
+ {
+ try
+ {
+ $this->extension_manager->enable($package);
+ }
+ catch (\phpbb\exception\runtime_exception $e)
+ {
+ $io->writeError([$e->getMessage(), $e->get_parameters()], true, 4);
+ }
+ catch (\Exception $e)
+ {
+ $io->writeError($e->getMessage(), true, 4);
+ }
+ }
+ }
+ }
+
/**
* {@inheritdoc}
*/
@@ -143,14 +186,25 @@ public function remove(array $packages, IOInterface $io = null)
*/
public function pre_remove(array $packages, IOInterface $io = null)
{
- $io->writeError('DISABLING_EXTENSIONS', true, 1);
+ if ($this->purge_on_remove)
+ {
+ $io->writeError('DISABLING_EXTENSIONS', true, 1);
+ }
+
foreach ($packages as $package)
{
try
{
if ($this->extension_manager->is_enabled($package))
{
- $this->extension_manager->disable($package);
+ if ($this->purge_on_remove)
+ {
+ $this->extension_manager->purge($package);
+ }
+ else
+ {
+ $this->extension_manager->disable($package);
+ }
}
}
catch (\phpbb\exception\runtime_exception $e)
@@ -227,4 +281,26 @@ public function start_managing($package, $io)
}
}
}
+
+ /**
+ * Enable the extensions when installing
+ *
+ * Warning: Only the explicitly required extensions will be enabled
+ *
+ * @param bool $enable
+ */
+ public function set_enable_on_install($enable)
+ {
+ $this->enable_on_install = $enable;
+ }
+
+ /**
+ * Purge the extension when disabling it
+ *
+ * @param bool $purge
+ */
+ public function set_purge_on_remove($purge)
+ {
+ $this->purge_on_remove = $purge;
+ }
}
diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php
index 1640c334f0a..4488aadb829 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -222,9 +222,11 @@ protected function do_get_installed_packages($types)
foreach ($installed_packages as $package)
{
- if (array_key_exists($package->getName(), $required_links) && in_array($package->getType(), $types, true))
+ if (in_array($package->getType(), $types, true))
{
- $installed[$package->getName()] = $required_links[$package->getName()]->getPrettyConstraint();
+ $version = array_key_exists($package->getName(), $required_links) ?
+ $required_links[$package->getName()]->getPrettyConstraint() : '*';
+ $installed[$package->getName()] = $version;
}
}
diff --git a/phpBB/phpbb/console/command/extension/install.php b/phpBB/phpbb/console/command/extension/install.php
index aa9d5a68679..6365da4a0ce 100644
--- a/phpBB/phpbb/console/command/extension/install.php
+++ b/phpBB/phpbb/console/command/extension/install.php
@@ -13,19 +13,20 @@
namespace phpbb\console\command\extension;
+use phpbb\composer\extension_manager;
use phpbb\composer\io\console_io;
-use phpbb\composer\manager_interface;
use phpbb\language\language;
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
class install extends \phpbb\console\command\command
{
/**
- * @var manager_interface Composer extensions manager
+ * @var extension_manager Composer extensions manager
*/
protected $manager;
@@ -34,11 +35,13 @@ class install extends \phpbb\console\command\command
*/
protected $language;
- public function __construct(\phpbb\user $user, manager_interface $manager, language $language)
+ public function __construct(\phpbb\user $user, extension_manager $manager, language $language)
{
$this->manager = $manager;
$this->language = $language;
+ $language->add_lang('acp/extensions');
+
parent::__construct($user);
}
@@ -51,11 +54,16 @@ protected function configure()
{
$this
->setName('extension:install')
- ->setDescription($this->user->lang('CLI_DESCRIPTION_EXTENSION_INSTALL'))
+ ->setDescription($this->language->lang('CLI_DESCRIPTION_EXTENSION_INSTALL'))
+ ->addOption(
+ 'enable',
+ 'e',
+ InputOption::VALUE_NONE,
+ $this->language->lang('CLI_DESCRIPTION_EXTENSION_INSTALL_OPTION_ENABLE'))
->addArgument(
'extensions',
InputArgument::IS_ARRAY | InputArgument::REQUIRED,
- $this->user->lang('CLI_DESCRIPTION_EXTENSION_INSTALL'))
+ $this->language->lang('CLI_DESCRIPTION_EXTENSION_INSTALL_ARGUMENT'))
;
}
@@ -74,9 +82,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
$composer_io = new console_io($input, $output, $this->getHelperSet(), $this->language);
$extensions = $input->getArgument('extensions');
+ if ($input->getOption('enable'))
+ {
+ $this->manager->set_enable_on_install(true);
+ }
+
$this->manager->install($extensions, $composer_io);
- $io->success('All extensions installed');
+ $io->success($this->language->lang('EXTENSIONS_INSTALLED'));
return 0;
}
diff --git a/phpBB/phpbb/console/command/extension/list_available.php b/phpBB/phpbb/console/command/extension/list_available.php
index c844201fd3f..2da8a988453 100644
--- a/phpBB/phpbb/console/command/extension/list_available.php
+++ b/phpBB/phpbb/console/command/extension/list_available.php
@@ -35,6 +35,8 @@ public function __construct(\phpbb\user $user, manager_interface $manager)
{
$this->manager = $manager;
+ $user->add_lang('acp/extensions');
+
parent::__construct($user);
}
diff --git a/phpBB/phpbb/console/command/extension/remove.php b/phpBB/phpbb/console/command/extension/remove.php
index d1f59dec5c2..181401e825c 100644
--- a/phpBB/phpbb/console/command/extension/remove.php
+++ b/phpBB/phpbb/console/command/extension/remove.php
@@ -13,19 +13,20 @@
namespace phpbb\console\command\extension;
+use phpbb\composer\extension_manager;
use phpbb\composer\io\console_io;
-use phpbb\composer\manager_interface;
use phpbb\language\language;
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
class remove extends \phpbb\console\command\command
{
/**
- * @var manager_interface Composer extensions manager
+ * @var extension_manager Composer extensions manager
*/
protected $manager;
@@ -34,11 +35,13 @@ class remove extends \phpbb\console\command\command
*/
protected $language;
- public function __construct(\phpbb\user $user, manager_interface $manager, language $language)
+ public function __construct(\phpbb\user $user, extension_manager $manager, language $language)
{
$this->manager = $manager;
$this->language = $language;
+ $language->add_lang('acp/extensions');
+
parent::__construct($user);
}
@@ -51,11 +54,16 @@ protected function configure()
{
$this
->setName('extension:remove')
- ->setDescription($this->user->lang('CLI_DESCRIPTION_EXTENSION_REMOVE'))
+ ->setDescription($this->language->lang('CLI_DESCRIPTION_EXTENSION_REMOVE'))
+ ->addOption(
+ 'purge',
+ 'p',
+ InputOption::VALUE_NONE,
+ $this->language->lang('CLI_DESCRIPTION_EXTENSION_REMOVE_OPTION_URGE'))
->addArgument(
'extensions',
InputArgument::IS_ARRAY | InputArgument::REQUIRED,
- $this->user->lang('CLI_DESCRIPTION_EXTENSION_REMOVE'))
+ $this->language->lang('CLI_DESCRIPTION_EXTENSION_REMOVE'))
;
}
@@ -74,9 +82,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
$composer_io = new console_io($input, $output, $this->getHelperSet(), $this->language);
$extensions = $input->getArgument('extensions');
+ if ($input->getOption('purge'))
+ {
+ $this->manager->set_purge_on_remove(true);
+ }
+
$this->manager->remove($extensions, $composer_io);
- $io->success('All extensions removed');
+ $io->success($this->language->lang('EXTENSIONS_REMOVED'));
return 0;
}
From 9b69cd74aeb3369cf469fdec549354b52af9128c Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Tue, 15 Sep 2015 13:52:29 +0200
Subject: [PATCH 137/431] [ticket/11150] Language keys
PHPBB3-11150
---
.../default/container/services_console.yml | 18 ++++++-------
phpBB/language/en/acp/extensions.php | 5 ++++
phpBB/language/en/cli.php | 12 +++++++++
.../{start_managing.php => manage.php} | 27 ++++++++++++-------
.../console/command/extension/remove.php | 4 +--
.../console/command/extension/update.php | 4 +--
6 files changed, 48 insertions(+), 22 deletions(-)
rename phpBB/phpbb/console/command/extension/{start_managing.php => manage.php} (65%)
diff --git a/phpBB/config/default/container/services_console.yml b/phpBB/config/default/container/services_console.yml
index 3b05ef9d465..a59fe3cd7e0 100644
--- a/phpBB/config/default/container/services_console.yml
+++ b/phpBB/config/default/container/services_console.yml
@@ -158,6 +158,15 @@ services:
tags:
- { name: console.command }
+ console.command.extension.manage:
+ class: phpbb\console\command\extension\manage
+ arguments:
+ - @user
+ - @ext.composer.manager
+ - @language
+ tags:
+ - { name: console.command }
+
console.command.extension.purge:
class: phpbb\console\command\extension\purge
arguments:
@@ -185,15 +194,6 @@ services:
tags:
- { name: console.command }
- console.command.extension.start_managing:
- class: phpbb\console\command\extension\start_managing
- arguments:
- - @user
- - @ext.composer.manager
- - @language
- tags:
- - { name: console.command }
-
console.command.extension.update:
class: phpbb\console\command\extension\update
arguments:
diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php
index 9d669a7587f..e3ba8e89ead 100644
--- a/phpBB/language/en/acp/extensions.php
+++ b/phpBB/language/en/acp/extensions.php
@@ -149,4 +149,9 @@
'PURGE_ON_REMOVE' => 'Purge extensions when removing',
'ENABLE_PACKAGIST' => 'Enable Packagist usage',
'ENABLE_PACKAGIST_EXPLAIN' => 'TODO text explaining why packagist shouldn\'t be enabled, dev usage, etc...',
+
+ 'EXTENSION_MANAGED_SUCCESS' => 'The extension %s is now managed automatically.',
+ 'EXTENSIONS_INSTALLED' => 'Extensions successfully installed.',
+ 'EXTENSIONS_REMOVED' => 'Extensions successfully removed.',
+ 'EXTENSIONS_UPDATED' => 'Extensions successfully updated..',
));
diff --git a/phpBB/language/en/cli.php b/phpBB/language/en/cli.php
index 2f969ceede8..43211ce4798 100644
--- a/phpBB/language/en/cli.php
+++ b/phpBB/language/en/cli.php
@@ -157,6 +157,18 @@
1 => 'Re-cleaning complete. %d username was cleaned.',
2 => 'Re-cleaning complete. %d usernames were cleaned.',
],
+
+ 'CLI_DESCRIPTION_EXTENSION_MANAGE' => 'Manages an extension',
+ 'CLI_DESCRIPTION_EXTENSION_MANAGE_ARGUMENT' => 'Extension to manage',
+ 'CLI_DESCRIPTION_EXTENSION_INSTALL' => 'Install extensions',
+ 'CLI_DESCRIPTION_EXTENSION_INSTALL_OPTION_ENABLE' => 'Enable the extensions after installing them',
+ 'CLI_DESCRIPTION_EXTENSION_INSTALL_ARGUMENT' => 'Extensions to install',
+ 'CLI_DESCRIPTION_EXTENSION_LIST_AVAILABLE' => 'Show extensions available for installation',
+ 'CLI_DESCRIPTION_EXTENSION_REMOVE' => 'Removes extensions',
+ 'CLI_DESCRIPTION_EXTENSION_REMOVE_OPTION_PURGE' => 'Purge the extensions before removing them',
+ 'CLI_DESCRIPTION_EXTENSION_REMOVE_ARGUMENT' => 'Extensions to remove',
+ 'CLI_DESCRIPTION_EXTENSION_UPDATE' => 'Updates extensions',
+ 'CLI_DESCRIPTION_EXTENSION_UPDATE_ARGUMENT' => 'Extensions to update',
));
// Additional help for commands.
diff --git a/phpBB/phpbb/console/command/extension/start_managing.php b/phpBB/phpbb/console/command/extension/manage.php
similarity index 65%
rename from phpBB/phpbb/console/command/extension/start_managing.php
rename to phpBB/phpbb/console/command/extension/manage.php
index ba21f44a70a..f308bbfb368 100644
--- a/phpBB/phpbb/console/command/extension/start_managing.php
+++ b/phpBB/phpbb/console/command/extension/manage.php
@@ -14,25 +14,33 @@
namespace phpbb\console\command\extension;
use phpbb\composer\exception\managed_with_error_exception;
+use phpbb\composer\io\console_io;
use phpbb\composer\manager;
use phpbb\composer\manager_interface;
+use phpbb\language\language;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
-class start_managing extends \phpbb\console\command\command
+class manage extends \phpbb\console\command\command
{
/**
* @var manager_interface Composer extensions manager
*/
protected $manager;
- public function __construct(\phpbb\user $user, manager_interface $manager)
+ /**
+ * @var \phpbb\language\language
+ */
+ protected $language;
+
+ public function __construct(\phpbb\user $user, manager_interface $manager, language $language)
{
$this->manager = $manager;
+ $this->language = $language;
- $user->add_lang('acp/extensions');
+ $language->add_lang('acp/extensions');
parent::__construct($user);
}
@@ -45,12 +53,12 @@ public function __construct(\phpbb\user $user, manager_interface $manager)
protected function configure()
{
$this
- ->setName('extension:start-managing')
- ->setDescription($this->user->lang('CLI_DESCRIPTION_EXTENSION_START_MANAGING'))
+ ->setName('extension:manage')
+ ->setDescription($this->language->lang('CLI_DESCRIPTION_EXTENSION_MANAGE'))
->addArgument(
'extension',
InputArgument::REQUIRED,
- $this->user->lang('CLI_DESCRIPTION_EXTENSION_START_MANAGING'))
+ $this->language->lang('CLI_DESCRIPTION_EXTENSION_MANAGE_ARGUMENT'))
;
}
@@ -64,20 +72,21 @@ protected function configure()
protected function execute(InputInterface $input, OutputInterface $output)
{
$io = new SymfonyStyle($input, $output);
+ $composer_io = new console_io($input, $output, $this->getHelperSet(), $this->language);
$extension = $input->getArgument('extension');
try
{
- $this->manager->start_managing($extension);
+ $this->manager->start_managing($extension, $composer_io);
}
catch (managed_with_error_exception $e)
{
- $io->warning(call_user_func_array([$this->user, 'lang'], [$e->getMessage(), $e->get_parameters()]));
+ $io->warning($this->language->lang_array($e->getMessage(), $e->get_parameters()));
return 1;
}
- $io->success('The extension ' . $extension . ' is now managed automatically.');
+ $io->success($this->language->lang('EXTENSION_MANAGED_SUCCESS', $extension));
return 0;
}
diff --git a/phpBB/phpbb/console/command/extension/remove.php b/phpBB/phpbb/console/command/extension/remove.php
index 181401e825c..8cb6b6c68a4 100644
--- a/phpBB/phpbb/console/command/extension/remove.php
+++ b/phpBB/phpbb/console/command/extension/remove.php
@@ -59,11 +59,11 @@ protected function configure()
'purge',
'p',
InputOption::VALUE_NONE,
- $this->language->lang('CLI_DESCRIPTION_EXTENSION_REMOVE_OPTION_URGE'))
+ $this->language->lang('CLI_DESCRIPTION_EXTENSION_REMOVE_OPTION_PURGE'))
->addArgument(
'extensions',
InputArgument::IS_ARRAY | InputArgument::REQUIRED,
- $this->language->lang('CLI_DESCRIPTION_EXTENSION_REMOVE'))
+ $this->language->lang('CLI_DESCRIPTION_EXTENSION_REMOVE_ARGUMENT'))
;
}
diff --git a/phpBB/phpbb/console/command/extension/update.php b/phpBB/phpbb/console/command/extension/update.php
index 7a38294ed40..073b38bae8e 100644
--- a/phpBB/phpbb/console/command/extension/update.php
+++ b/phpBB/phpbb/console/command/extension/update.php
@@ -55,7 +55,7 @@ protected function configure()
->addArgument(
'extensions',
InputArgument::IS_ARRAY | InputArgument::REQUIRED,
- $this->user->lang('CLI_DESCRIPTION_EXTENSION_UPDATE'))
+ $this->user->lang('CLI_DESCRIPTION_EXTENSION_UPDATE_ARGUMENT'))
;
}
@@ -76,7 +76,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->manager->update($extensions, $composer_io);
- $io->success('All extensions updated');
+ $io->success($this->language->lang('EXTENSIONS_UPDATED'));
return 0;
}
From 0a809fb90ebbb506b139c5587ef9a210deca62f0 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Tue, 15 Sep 2015 14:24:06 +0200
Subject: [PATCH 138/431] [ticket/11150] Add missing language keys
PHPBB3-11150
---
phpBB/adm/style/acp_ext_gallery.html | 4 ++--
phpBB/includes/acp/acp_extensions.php | 3 ++-
phpBB/language/en/acp/common.php | 5 +++++
phpBB/language/en/acp/extensions.php | 20 ++++++++++++++------
phpBB/phpbb/composer/manager.php | 8 ++++++++
phpBB/phpbb/composer/manager_interface.php | 7 +++++++
6 files changed, 38 insertions(+), 9 deletions(-)
diff --git a/phpBB/adm/style/acp_ext_gallery.html b/phpBB/adm/style/acp_ext_gallery.html
index b2ef0332889..dfd8ffaf046 100644
--- a/phpBB/adm/style/acp_ext_gallery.html
+++ b/phpBB/adm/style/acp_ext_gallery.html
@@ -2,9 +2,9 @@
-{{lang( 'EXTENSIONS_ADMIN') }}
+{{lang( 'EXTENSIONS_GALLERY') }}
-{{lang( 'EXTENSIONS_EXPLAIN') }}
+{{lang( 'EXTENSIONS_GALLERY_EXPLAIN') }}
{{ lang('BROWSE_EXTENSIONS_DATABASE') }} • {{ lang('SETTINGS') }}
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index eec896cbfe1..28f102e0066 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -566,7 +566,7 @@ public function gallery_mode($id, $mode)
$this->template->assign_vars(array(
'MESSAGE_TITLE' => $language->lang('ACP_EXTENSIONS_MANAGE'),
- 'MESSAGE_TEXT' => $language->lang('EXTENSION_MANAGED') . adm_back_link($this->u_action),
+ 'MESSAGE_TEXT' => $language->lang('EXTENSION_MANAGED_SUCCESS', $extension) . adm_back_link($this->u_action),
'MESSAGE_DETAIL' => $composer_io->getOutput(),
'MESSAGE_DETAIL_LEGEND' => $language->lang('COMPOSER_OUTPUT'),
'S_USER_NOTICE' => true,
@@ -642,6 +642,7 @@ public function gallery_mode($id, $mode)
'purge_on_remove' => $this->config['exts_composer_purge_on_remove'],
'repositories' => unserialize($this->config['exts_composer_repositories']),
]);
+ $this->template->assign_var('enabled', $this->manager->check_requirements());
$this->request->disable_super_globals();
add_form_key('gallery_settings');
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 40b4a5d9d47..4657c08bcfd 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -89,6 +89,10 @@
'ACP_EXTENSION_MANAGEMENT' => 'Extension management',
'ACP_EXTENSIONS' => 'Manage extensions',
'ACP_EXTENSIONS_GALLERY' => 'Extensions gallery',
+ 'ACP_EXTENSIONS_INSTALL' => 'Install extensions',
+ 'ACP_EXTENSIONS_REMOVE' => 'Remove extensions',
+ 'ACP_EXTENSIONS_UPDATE' => 'Update extensions',
+ 'ACP_EXTENSIONS_MANAGE' => 'Manage extension automatically',
'ACP_FORUM_BASED_PERMISSIONS' => 'Forum based permissions',
'ACP_FORUM_LOGS' => 'Forum logs',
@@ -250,6 +254,7 @@
'COMPOSER_INSTALLING_PACKAGE' => ' - Installing %1$s (%2$s)',
'COMPOSER_DELETING' => ' - Deleting %s',
'COMPOSER_UPDATE_NOTHING' => 'Nothing to update',
+ 'COMPOSER_OUTPUT' => 'Composer output',
'CONFIG_UPDATED' => 'Configuration updated successfully.',
'CRON_LOCK_ERROR' => 'Could not obtain cron lock.',
diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php
index e3ba8e89ead..55a8778be07 100644
--- a/phpBB/language/en/acp/extensions.php
+++ b/phpBB/language/en/acp/extensions.php
@@ -45,6 +45,12 @@
'EXTENSION_MANAGED_WITH_ENABLE_ERROR' => 'The “%s” extension has been installed but an error occurred when re-enabling it.',
'EXTENSION_NOT_INSTALLED' => 'The “%s” extension is not installed.',
+ 'ENABLING_EXTENSIONS' => 'Enabling extensions',
+ 'DISABLING_EXTENSIONS' => 'Disabling extensions',
+
+ 'EXTENSIONS_GALLERY' => 'Extensions Gallery',
+ 'EXTENSIONS_GALLERY_EXPLAIN' => 'The Extensions Gallery is a tool in your phpBB Board which allows you to see all the extensions that are available for your board.',
+
'EXTENSION' => 'Extension',
'EXTENSIONS' => 'Extensions',
'EXTENSIONS_ADMIN' => 'Extensions Manager',
@@ -148,10 +154,12 @@
'ENABLE_ON_INSTALL' => 'Enable extensions when installing',
'PURGE_ON_REMOVE' => 'Purge extensions when removing',
'ENABLE_PACKAGIST' => 'Enable Packagist usage',
- 'ENABLE_PACKAGIST_EXPLAIN' => 'TODO text explaining why packagist shouldn\'t be enabled, dev usage, etc...',
-
- 'EXTENSION_MANAGED_SUCCESS' => 'The extension %s is now managed automatically.',
- 'EXTENSIONS_INSTALLED' => 'Extensions successfully installed.',
- 'EXTENSIONS_REMOVED' => 'Extensions successfully removed.',
- 'EXTENSIONS_UPDATED' => 'Extensions successfully updated..',
+ 'ENABLE_PACKAGIST_EXPLAIN' => 'TODO: text explaining why packagist shouldn\'t be enabled, dev usage, etc...',
+ 'ENABLE_PACKAGIST_CONFIRM' => 'TODO: are you sure you ant to enable packagist?',
+
+ 'EXTENSION_MANAGED_SUCCESS' => 'The extension %s is now managed automatically.',
+ 'EXTENSIONS_INSTALLED' => 'Extensions successfully installed.',
+ 'EXTENSIONS_REMOVED' => 'Extensions successfully removed.',
+ 'EXTENSIONS_UPDATED' => 'Extensions successfully updated.',
+ 'EXTENSIONS_DIR_NOT_WRITABLE' => 'The extension directory is not writable',
));
diff --git a/phpBB/phpbb/composer/manager.php b/phpBB/phpbb/composer/manager.php
index 1941e79fff5..286551ae950 100644
--- a/phpBB/phpbb/composer/manager.php
+++ b/phpBB/phpbb/composer/manager.php
@@ -271,6 +271,14 @@ public function start_managing($package, $io)
throw new \phpbb\exception\runtime_exception('COMPOSER_UNSUPPORTED_OPERATION', (array) $this->package_type);
}
+ /**
+ * {@inheritdoc}
+ */
+ public function check_requirements()
+ {
+ return true;
+ }
+
protected function normalize_version($packages)
{
$normalized_packages = [];
diff --git a/phpBB/phpbb/composer/manager_interface.php b/phpBB/phpbb/composer/manager_interface.php
index 2572ba08312..ab36f58dc9a 100644
--- a/phpBB/phpbb/composer/manager_interface.php
+++ b/phpBB/phpbb/composer/manager_interface.php
@@ -89,4 +89,11 @@ public function get_available_packages();
* @throws runtime_exception
*/
public function start_managing($package, $io);
+
+ /**
+ * Checks the requirements of the manager and returns true if it can be used.
+ *
+ * @return bool
+ */
+ public function check_requirements();
}
From cc0a762866fe625a8b284a2b8844c674ad1d4359 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Tue, 15 Sep 2015 14:48:21 +0200
Subject: [PATCH 139/431] [ticket/11150] Disable if directories not writable
PHPBB3-11150
---
phpBB/adm/style/acp_ext_gallery.html | 14 ++++++++---
.../default/container/services_extensions.yml | 2 ++
phpBB/includes/acp/acp_extensions.php | 9 ++-----
phpBB/language/en/acp/extensions.php | 3 ++-
phpBB/phpbb/composer/extension_manager.php | 12 +++++++++-
phpBB/phpbb/composer/installer.php | 24 ++++++++++++++++++-
phpBB/phpbb/composer/manager.php | 2 +-
.../console/command/extension/install.php | 9 ++++++-
.../console/command/extension/manage.php | 7 ++++++
.../console/command/extension/remove.php | 9 ++++++-
.../console/command/extension/update.php | 7 ++++++
11 files changed, 82 insertions(+), 16 deletions(-)
diff --git a/phpBB/adm/style/acp_ext_gallery.html b/phpBB/adm/style/acp_ext_gallery.html
index dfd8ffaf046..d67b657c9c8 100644
--- a/phpBB/adm/style/acp_ext_gallery.html
+++ b/phpBB/adm/style/acp_ext_gallery.html
@@ -6,6 +6,12 @@ {{lang( 'EXTENSIONS_GALLERY') }}
{{lang( 'EXTENSIONS_GALLERY_EXPLAIN') }}
+{% if not enabled %}
+
+ {{ lang('EXTENSIONS_COMPOSER_NOT_WRITABLE') }}
+
+{% endif %}
+
{{ lang('BROWSE_EXTENSIONS_DATABASE') }} • {{ lang('SETTINGS') }}
@@ -87,12 +93,14 @@ {{lang( 'EXTENSIONS_GALLERY') }}
{{ extension.description }} • {{ lang('HOMEPAGE') }}
{% if extension.name in managed_extensions %}
- {{ lang('INSTALLED') }}
+ {{ lang('INSTALLED') }}
+ {%- if enabled -%}
({{ lang('UPDATE') }}
• {{ lang('REMOVE') }} )
+ {%- endif -%}
{% elseif extension.name in installed_extensions -%}
- {{ lang('INSTALLED_MANUALLY') }} ({{ lang('MANAGE') }} )
- {% else -%}
+ {{ lang('INSTALLED_MANUALLY') }} {%- if enabled %} ({{ lang('MANAGE') }} ){%- endif -%}
+ {% elseif enabled -%}
{{ lang('INSTALL') }}
{%- endif -%}
diff --git a/phpBB/config/default/container/services_extensions.yml b/phpBB/config/default/container/services_extensions.yml
index 77ff0d2ab99..b97ae1fa9c3 100644
--- a/phpBB/config/default/container/services_extensions.yml
+++ b/phpBB/config/default/container/services_extensions.yml
@@ -26,6 +26,8 @@ services:
- @filesystem
- phpbb-extension
- EXTENSIONS_
+ - %core.root_path%
+ - @config
style.composer.manager:
class: phpbb\composer\manager
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 28f102e0066..4a89bb45a49 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -642,7 +642,7 @@ public function gallery_mode($id, $mode)
'purge_on_remove' => $this->config['exts_composer_purge_on_remove'],
'repositories' => unserialize($this->config['exts_composer_repositories']),
]);
- $this->template->assign_var('enabled', $this->manager->check_requirements());
+ $this->template->assign_var('enabled', $manager->check_requirements());
$this->request->disable_super_globals();
add_form_key('gallery_settings');
@@ -672,12 +672,7 @@ private function display_composer_exception(\phpbb\language\language $language,
}
else
{
- $message_text = $e->getPrevious()->getMessage();
- if (strpos($message_text, 'ext/') === 0 && strpos($message_text, 'does not exist and could not be created.') !== false)
- {
- $message_text = $language->lang('EXTENSIONS_DIR_NOT_WRITABLE');
- }
- $message_text .= adm_back_link($this->u_action);
+ $message_text = $e->getPrevious()->getMessage() . adm_back_link($this->u_action);
}
}
else
diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php
index 55a8778be07..e65df90c9ca 100644
--- a/phpBB/language/en/acp/extensions.php
+++ b/phpBB/language/en/acp/extensions.php
@@ -161,5 +161,6 @@
'EXTENSIONS_INSTALLED' => 'Extensions successfully installed.',
'EXTENSIONS_REMOVED' => 'Extensions successfully removed.',
'EXTENSIONS_UPDATED' => 'Extensions successfully updated.',
- 'EXTENSIONS_DIR_NOT_WRITABLE' => 'The extension directory is not writable',
+
+ 'EXTENSIONS_COMPOSER_NOT_WRITABLE' => 'TODO: some required files / directory are not writable => disable ',
));
diff --git a/phpBB/phpbb/composer/extension_manager.php b/phpBB/phpbb/composer/extension_manager.php
index 8b2388e6939..aef1513d4b0 100644
--- a/phpBB/phpbb/composer/extension_manager.php
+++ b/phpBB/phpbb/composer/extension_manager.php
@@ -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 @@ public function start_managing($package, $io)
}
}
+ /**
+ * {@inheritdoc}
+ */
+ public function check_requirements()
+ {
+ return parent::check_requirements() && $this->filesystem->is_writable($this->root_path . 'ext/');
+ }
+
/**
* Enable the extensions when installing
*
diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php
index 4488aadb829..9a02060316d 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -77,7 +77,13 @@ public function __construct($root_path, config $config = null)
{
if ($config)
{
- $this->repositories = (array) unserialize($config['exts_composer_repositories']);
+ $repositories = unserialize($config['exts_composer_repositories']);
+
+ if (!is_array($repositories) && !empty($repositories))
+ {
+ $this->repositories = (array) $repositories;
+ }
+
$this->packagist = (bool) $config['exts_composer_packagist'];
$this->composer_filename = $config['exts_composer_json_file'];
$this->packages_vendor_dir = $config['exts_composer_vendor_dir'];
@@ -395,6 +401,22 @@ protected function do_get_available_packages($type)
}
}
+ /**
+ * Checks the requirements of the manager and returns true if it can be used.
+ *
+ * @return bool
+ */
+ public function check_requirements()
+ {
+ $filesystem = new \phpbb\filesystem\filesystem();
+
+ return $filesystem->is_writable([
+ $this->root_path . $this->composer_filename,
+ $this->root_path . $this->packages_vendor_dir,
+ $this->root_path . substr($this->composer_filename, 0, -5) . '.lock',
+ ]);
+ }
+
/**
* Updates $compatible_packages with the versions of $versions compatibles with the $core_constraint
*
diff --git a/phpBB/phpbb/composer/manager.php b/phpBB/phpbb/composer/manager.php
index 286551ae950..cffc6c85663 100644
--- a/phpBB/phpbb/composer/manager.php
+++ b/phpBB/phpbb/composer/manager.php
@@ -276,7 +276,7 @@ public function start_managing($package, $io)
*/
public function check_requirements()
{
- return true;
+ return $this->installer->check_requirements();
}
protected function normalize_version($packages)
diff --git a/phpBB/phpbb/console/command/extension/install.php b/phpBB/phpbb/console/command/extension/install.php
index 6365da4a0ce..bbed53be306 100644
--- a/phpBB/phpbb/console/command/extension/install.php
+++ b/phpBB/phpbb/console/command/extension/install.php
@@ -57,7 +57,7 @@ protected function configure()
->setDescription($this->language->lang('CLI_DESCRIPTION_EXTENSION_INSTALL'))
->addOption(
'enable',
- 'e',
+ null,
InputOption::VALUE_NONE,
$this->language->lang('CLI_DESCRIPTION_EXTENSION_INSTALL_OPTION_ENABLE'))
->addArgument(
@@ -79,6 +79,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->getFormatter()->setStyle('warning', new OutputFormatterStyle('black', 'yellow'));
$io = new SymfonyStyle($input, $output);
+
+ if (!$this->manager->check_requirements())
+ {
+ $io->error($this->language->lang('EXTENSIONS_COMPOSER_NOT_WRITABLE'));
+ return 1;
+ }
+
$composer_io = new console_io($input, $output, $this->getHelperSet(), $this->language);
$extensions = $input->getArgument('extensions');
diff --git a/phpBB/phpbb/console/command/extension/manage.php b/phpBB/phpbb/console/command/extension/manage.php
index f308bbfb368..264d120c5da 100644
--- a/phpBB/phpbb/console/command/extension/manage.php
+++ b/phpBB/phpbb/console/command/extension/manage.php
@@ -72,6 +72,13 @@ protected function configure()
protected function execute(InputInterface $input, OutputInterface $output)
{
$io = new SymfonyStyle($input, $output);
+
+ if (!$this->manager->check_requirements())
+ {
+ $io->error($this->language->lang('EXTENSIONS_COMPOSER_NOT_WRITABLE'));
+ return 1;
+ }
+
$composer_io = new console_io($input, $output, $this->getHelperSet(), $this->language);
$extension = $input->getArgument('extension');
diff --git a/phpBB/phpbb/console/command/extension/remove.php b/phpBB/phpbb/console/command/extension/remove.php
index 8cb6b6c68a4..69d2a62dd97 100644
--- a/phpBB/phpbb/console/command/extension/remove.php
+++ b/phpBB/phpbb/console/command/extension/remove.php
@@ -57,7 +57,7 @@ protected function configure()
->setDescription($this->language->lang('CLI_DESCRIPTION_EXTENSION_REMOVE'))
->addOption(
'purge',
- 'p',
+ null,
InputOption::VALUE_NONE,
$this->language->lang('CLI_DESCRIPTION_EXTENSION_REMOVE_OPTION_PURGE'))
->addArgument(
@@ -79,6 +79,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->getFormatter()->setStyle('warning', new OutputFormatterStyle('black', 'yellow'));
$io = new SymfonyStyle($input, $output);
+
+ if (!$this->manager->check_requirements())
+ {
+ $io->error($this->language->lang('EXTENSIONS_COMPOSER_NOT_WRITABLE'));
+ return 1;
+ }
+
$composer_io = new console_io($input, $output, $this->getHelperSet(), $this->language);
$extensions = $input->getArgument('extensions');
diff --git a/phpBB/phpbb/console/command/extension/update.php b/phpBB/phpbb/console/command/extension/update.php
index 073b38bae8e..f1479c8b0d7 100644
--- a/phpBB/phpbb/console/command/extension/update.php
+++ b/phpBB/phpbb/console/command/extension/update.php
@@ -71,6 +71,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->getFormatter()->setStyle('warning', new OutputFormatterStyle('black', 'yellow'));
$io = new SymfonyStyle($input, $output);
+
+ if (!$this->manager->check_requirements())
+ {
+ $io->error($this->language->lang('EXTENSIONS_COMPOSER_NOT_WRITABLE'));
+ return 1;
+ }
+
$composer_io = new console_io($input, $output, $this->getHelperSet(), $this->language);
$extensions = $input->getArgument('extensions');
From 31931134aae2fc9f3addb1b3d8337bf073091834 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Tue, 15 Sep 2015 18:52:45 +0200
Subject: [PATCH 140/431] [ticket/11150] Composer is using $_SERVER for some
git stuff
PHPBB3-11150
---
phpBB/includes/acp/acp_extensions.php | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 4a89bb45a49..4dd1afa27ba 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -427,6 +427,8 @@ public function gallery_mode($id, $mode)
switch ($action)
{
case 'install':
+ $this->page_title = 'ACP_EXTENSIONS_INSTALL';
+
$extension = $this->request->variable('extension', '');
if (empty($extension))
@@ -464,6 +466,8 @@ public function gallery_mode($id, $mode)
break;
case 'remove':
+ $this->page_title = 'ACP_EXTENSIONS_REMOVE';
+
$extension = $this->request->variable('extension', '');
if (empty($extension))
@@ -501,6 +505,8 @@ public function gallery_mode($id, $mode)
break;
case 'update':
+ $this->page_title = 'ACP_EXTENSIONS_UPDATE';
+
$extension = $this->request->variable('extension', '');
if (empty($extension))
@@ -538,6 +544,8 @@ public function gallery_mode($id, $mode)
break;
case 'manage':
+ $this->page_title = 'ACP_EXTENSIONS_MANAGE';
+
$extension = $this->request->variable('extension', '');
if (empty($extension))
@@ -623,7 +631,11 @@ public function gallery_mode($id, $mode)
$start = $this->request->variable('start', 0);
$base_url = $this->u_action;
+ $this->request->enable_super_globals();
$available_extensions = $manager->get_available_packages();
+ $managed_packages = $manager->get_managed_packages();
+ $this->request->disable_super_globals();
+
$extensions = array_slice($available_extensions, $start, 20);
$pagination->generate_template_pagination($base_url, 'pagination', 'start', count($available_extensions), 20, $start);
@@ -631,9 +643,8 @@ public function gallery_mode($id, $mode)
$this->page_title = 'ACP_EXTENSIONS_GALLERY';
$this->tpl_name = 'acp_ext_gallery';
- $this->request->enable_super_globals();
$this->template->assign_var('extensions', $extensions);
- $this->template->assign_var('managed_extensions', array_keys($manager->get_managed_packages()));
+ $this->template->assign_var('managed_extensions', array_keys($managed_packages));
$this->template->assign_var('installed_extensions', array_keys($extensions_manager->all_available()));
$this->template->assign_var('U_ACTION', $this->u_action);
$this->template->assign_var('settings', [
@@ -643,7 +654,6 @@ public function gallery_mode($id, $mode)
'repositories' => unserialize($this->config['exts_composer_repositories']),
]);
$this->template->assign_var('enabled', $manager->check_requirements());
- $this->request->disable_super_globals();
add_form_key('gallery_settings');
From 1acef8d2689c8e0958b654f9733ba6793c0a7931 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Tue, 15 Sep 2015 18:56:02 +0200
Subject: [PATCH 141/431] [ticket/11150] Updates CLI wording
PHPBB3-11150
---
phpBB/language/en/cli.php | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/phpBB/language/en/cli.php b/phpBB/language/en/cli.php
index 43211ce4798..60469104555 100644
--- a/phpBB/language/en/cli.php
+++ b/phpBB/language/en/cli.php
@@ -160,15 +160,15 @@
'CLI_DESCRIPTION_EXTENSION_MANAGE' => 'Manages an extension',
'CLI_DESCRIPTION_EXTENSION_MANAGE_ARGUMENT' => 'Extension to manage',
- 'CLI_DESCRIPTION_EXTENSION_INSTALL' => 'Install extensions',
- 'CLI_DESCRIPTION_EXTENSION_INSTALL_OPTION_ENABLE' => 'Enable the extensions after installing them',
- 'CLI_DESCRIPTION_EXTENSION_INSTALL_ARGUMENT' => 'Extensions to install',
- 'CLI_DESCRIPTION_EXTENSION_LIST_AVAILABLE' => 'Show extensions available for installation',
- 'CLI_DESCRIPTION_EXTENSION_REMOVE' => 'Removes extensions',
- 'CLI_DESCRIPTION_EXTENSION_REMOVE_OPTION_PURGE' => 'Purge the extensions before removing them',
- 'CLI_DESCRIPTION_EXTENSION_REMOVE_ARGUMENT' => 'Extensions to remove',
- 'CLI_DESCRIPTION_EXTENSION_UPDATE' => 'Updates extensions',
- 'CLI_DESCRIPTION_EXTENSION_UPDATE_ARGUMENT' => 'Extensions to update',
+ 'CLI_DESCRIPTION_EXTENSION_INSTALL' => 'Install the specified extension(s).',
+ 'CLI_DESCRIPTION_EXTENSION_INSTALL_OPTION_ENABLE' => 'Enable extension(s) after installation',
+ 'CLI_DESCRIPTION_EXTENSION_INSTALL_ARGUMENT' => 'Extension(s) to install, e.g.: vendor/package',
+ 'CLI_DESCRIPTION_EXTENSION_LIST_AVAILABLE' => 'List extensions available for installation.',
+ 'CLI_DESCRIPTION_EXTENSION_REMOVE' => 'Remove the specified extension(s).',
+ 'CLI_DESCRIPTION_EXTENSION_REMOVE_OPTION_PURGE' => 'Purge extension(s) when removing them',
+ 'CLI_DESCRIPTION_EXTENSION_REMOVE_ARGUMENT' => 'Extension(s) to remove, e.g.: vendor/package',
+ 'CLI_DESCRIPTION_EXTENSION_UPDATE' => 'Update the specified extension(s).',
+ 'CLI_DESCRIPTION_EXTENSION_UPDATE_ARGUMENT' => 'Extension(s) to update, e.g.: vendor/package',
));
// Additional help for commands.
From 35b0543da9aa2fa8b545b4c3ada21cf24c4fef3d Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Tue, 15 Sep 2015 18:59:43 +0200
Subject: [PATCH 142/431] [ticket/11150] Uses percentages instead of fixed
column size
PHPBB3-11150
---
phpBB/adm/style/acp_ext_gallery.html | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/phpBB/adm/style/acp_ext_gallery.html b/phpBB/adm/style/acp_ext_gallery.html
index d67b657c9c8..7da97edd1ed 100644
--- a/phpBB/adm/style/acp_ext_gallery.html
+++ b/phpBB/adm/style/acp_ext_gallery.html
@@ -76,10 +76,10 @@ {{lang( 'EXTENSIONS_GALLERY') }}
- {{ lang("EXTENSION_NAME") }}
- {{ lang("VERSION") }}
+ {{ lang("EXTENSION_NAME") }}
+ {{ lang("VERSION") }}
{{ lang("DESCRIPTION") }}
- {{ lang("EXTENSION_ACTIONS") }}
+ {{ lang("EXTENSION_ACTIONS") }}
From 178f0e16393fe77f599d708ea96339a766b1ce36 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Tue, 15 Sep 2015 19:00:59 +0200
Subject: [PATCH 143/431] [ticket/11150] Tweak gallery actions
PHPBB3-11150
---
phpBB/adm/style/acp_ext_gallery.html | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/phpBB/adm/style/acp_ext_gallery.html b/phpBB/adm/style/acp_ext_gallery.html
index 7da97edd1ed..4b85494a09b 100644
--- a/phpBB/adm/style/acp_ext_gallery.html
+++ b/phpBB/adm/style/acp_ext_gallery.html
@@ -99,7 +99,9 @@ {{lang( 'EXTENSIONS_GALLERY') }}
• {{ lang('REMOVE') }} )
{%- endif -%}
{% elseif extension.name in installed_extensions -%}
- {{ lang('INSTALLED_MANUALLY') }} {%- if enabled %} ({{ lang('MANAGE') }} ){%- endif -%}
+ {{ lang('INSTALLED_MANUALLY') }}
+ {%- if enabled -%}
+ ({{ lang('MANAGE') }} ){%- endif -%}
{% elseif enabled -%}
{{ lang('INSTALL') }}
{%- endif -%}
From 560d4729f98c4b7d9ce607fa600d22a7c3eaecf0 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Tue, 15 Sep 2015 21:24:28 +0200
Subject: [PATCH 144/431] [ticket/11150] Small fix
PHPBB3-11150
---
phpBB/language/en/acp/extensions.php | 2 ++
phpBB/phpbb/composer/extension_manager.php | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php
index e65df90c9ca..0a94481a87d 100644
--- a/phpBB/language/en/acp/extensions.php
+++ b/phpBB/language/en/acp/extensions.php
@@ -156,6 +156,8 @@
'ENABLE_PACKAGIST' => 'Enable Packagist usage',
'ENABLE_PACKAGIST_EXPLAIN' => 'TODO: text explaining why packagist shouldn\'t be enabled, dev usage, etc...',
'ENABLE_PACKAGIST_CONFIRM' => 'TODO: are you sure you ant to enable packagist?',
+ 'COMPOSER_REPOSITORIES' => 'Repositories',
+ 'COMPOSER_REPOSITORIES_EXPLAIN' => 'TODO: One repo per line',
'EXTENSION_MANAGED_SUCCESS' => 'The extension %s is now managed automatically.',
'EXTENSIONS_INSTALLED' => 'Extensions successfully installed.',
diff --git a/phpBB/phpbb/composer/extension_manager.php b/phpBB/phpbb/composer/extension_manager.php
index aef1513d4b0..8a6a09680b6 100644
--- a/phpBB/phpbb/composer/extension_manager.php
+++ b/phpBB/phpbb/composer/extension_manager.php
@@ -275,7 +275,7 @@ public function start_managing($package, $io)
try
{
$io->writeError('ENABLING_EXTENSION', true, 1);
- $this->extension_manager->enabling($package);
+ $this->extension_manager->enable($package);
}
catch (\Exception $e)
{
From 963eea33a9e34301dba94be3f5f87940302d40b8 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Wed, 16 Sep 2015 11:19:45 +0200
Subject: [PATCH 145/431] [ticket/11150] Move composer output
PHPBB3-11150
---
phpBB/adm/style/detailled_message_body.html | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/phpBB/adm/style/detailled_message_body.html b/phpBB/adm/style/detailled_message_body.html
index 001fe921e1f..f5f42eff2ef 100644
--- a/phpBB/adm/style/detailled_message_body.html
+++ b/phpBB/adm/style/detailled_message_body.html
@@ -1,14 +1,15 @@
+
+
{{ MESSAGE_TITLE }}
+
{{ MESSAGE_TEXT }}
+
+
{%- if MESSAGE_DETAIL_LEGEND -%}
- {{ MESSAGE_DETAIL_LEGEND|nl2br }}
+ {{ MESSAGE_DETAIL_LEGEND|nl2br }}
{%- endif -%}
{{ MESSAGE_DETAIL }}
-
-
{{ MESSAGE_TITLE }}
-
{{ MESSAGE_TEXT }}
-
From 38a58df41bed8f21a2c72a12b25daca9b3362212 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Wed, 16 Sep 2015 11:33:01 +0200
Subject: [PATCH 146/431] [ticket/11150] Gallery => Catalog
PHPBB3-11150
---
...acp_ext_gallery.html => acp_ext_catalog.html} | 12 ++++++------
phpBB/adm/style/acp_ext_list.html | 8 ++++----
phpBB/includes/acp/acp_extensions.php | 16 ++++++++--------
phpBB/includes/acp/info/acp_extensions.php | 2 +-
phpBB/language/en/acp/common.php | 2 +-
phpBB/language/en/acp/extensions.php | 6 +++---
.../migration/data/v320/extensions_composer.php | 2 +-
7 files changed, 24 insertions(+), 24 deletions(-)
rename phpBB/adm/style/{acp_ext_gallery.html => acp_ext_catalog.html} (92%)
diff --git a/phpBB/adm/style/acp_ext_gallery.html b/phpBB/adm/style/acp_ext_catalog.html
similarity index 92%
rename from phpBB/adm/style/acp_ext_gallery.html
rename to phpBB/adm/style/acp_ext_catalog.html
index 4b85494a09b..23b966c615b 100644
--- a/phpBB/adm/style/acp_ext_gallery.html
+++ b/phpBB/adm/style/acp_ext_catalog.html
@@ -2,9 +2,9 @@
-{{lang( 'EXTENSIONS_GALLERY') }}
+{{lang( 'EXTENSIONS_CATALOG') }}
-{{lang( 'EXTENSIONS_GALLERY_EXPLAIN') }}
+{{lang( 'EXTENSIONS_CATALOG_EXPLAIN') }}
{% if not enabled %}
{% endif %}
-
+
- {{ lang('EXTENSIONS_GALLERY_SETTINGS') }}
+ {{ lang('EXTENSIONS_CATALOG_SETTINGS') }}
{{ lang('ENABLE_ON_INSTALL') }}{{ lang('COLON') }}
@@ -66,7 +66,7 @@ {{lang( 'EXTENSIONS_GALLERY') }}
-
+
{{ S_FORM_TOKEN }}
diff --git a/phpBB/adm/style/acp_ext_list.html b/phpBB/adm/style/acp_ext_list.html
index 0ab620b864c..9f22c037228 100644
--- a/phpBB/adm/style/acp_ext_list.html
+++ b/phpBB/adm/style/acp_ext_list.html
@@ -65,8 +65,8 @@ {L_EXTENSIONS_ADMIN}
|
- {L_UPDATE}
- | {L_REMOVE}
+ {L_UPDATE}
+ | {L_REMOVE}
@@ -98,8 +98,8 @@ {L_EXTENSIONS_ADMIN}
|
- {L_UPDATE}
- | {L_REMOVE}
+ {L_UPDATE}
+ | {L_REMOVE}
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 4dd1afa27ba..aaac3b04fd8 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -60,8 +60,8 @@ function main()
switch ($mode)
{
- case 'gallery':
- $this->gallery_mode($id, $mode);
+ case 'catalog':
+ $this->catalog_mode($id, $mode);
break;
default:
$this->main_mode($id, $mode);
@@ -177,7 +177,7 @@ public function main_mode($id, $mode)
'FORCE_UNSTABLE' => $this->config['extension_force_unstable'],
'U_ACTION' => $this->u_action,
'MANAGED_EXTENSIONS' => array_keys($composer_manager->get_managed_packages()),
- 'U_GALLERY_ACTION' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=gallery"),
+ 'U_CATALOG_ACTION' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=catalog"),
));
$this->request->disable_super_globals();
@@ -409,7 +409,7 @@ public function main_mode($id, $mode)
$this->tpl_name = $tpl_name;
}
- public function gallery_mode($id, $mode)
+ public function catalog_mode($id, $mode)
{
global $phpbb_container;
@@ -593,7 +593,7 @@ public function gallery_mode($id, $mode)
$submit = $this->request->is_set('update');
if ($submit)
{
- if (!check_form_key('gallery_settings'))
+ if (!check_form_key('catalog_settings'))
{
trigger_error($language->lang('FORM_INVALID') . adm_back_link($this->u_action), E_USER_WARNING);
}
@@ -640,8 +640,8 @@ public function gallery_mode($id, $mode)
$pagination->generate_template_pagination($base_url, 'pagination', 'start', count($available_extensions), 20, $start);
- $this->page_title = 'ACP_EXTENSIONS_GALLERY';
- $this->tpl_name = 'acp_ext_gallery';
+ $this->page_title = 'ACP_EXTENSIONS_CATALOG';
+ $this->tpl_name = 'acp_ext_catalog';
$this->template->assign_var('extensions', $extensions);
$this->template->assign_var('managed_extensions', array_keys($managed_packages));
@@ -655,7 +655,7 @@ public function gallery_mode($id, $mode)
]);
$this->template->assign_var('enabled', $manager->check_requirements());
- add_form_key('gallery_settings');
+ add_form_key('catalog_settings');
break;
}
diff --git a/phpBB/includes/acp/info/acp_extensions.php b/phpBB/includes/acp/info/acp_extensions.php
index 5d9e420fda8..f555d0fa8c0 100644
--- a/phpBB/includes/acp/info/acp_extensions.php
+++ b/phpBB/includes/acp/info/acp_extensions.php
@@ -20,7 +20,7 @@ function module()
'title' => 'ACP_EXTENSION_MANAGEMENT',
'modes' => array(
'main' => array('title' => 'ACP_EXTENSIONS', 'auth' => 'acl_a_extensions', 'cat' => array('ACP_EXTENSION_MANAGEMENT')),
- 'gallery' => array('title' => 'ACP_EXTENSIONS_GALLERY', 'auth' => 'acl_a_extensions', 'cat' => array('ACP_EXTENSION_MANAGEMENT')),
+ 'catalog' => array('title' => 'ACP_EXTENSIONS_CATALOG', 'auth' => 'acl_a_extensions', 'cat' => array('ACP_EXTENSION_MANAGEMENT')),
),
);
}
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 4657c08bcfd..53ac2f3fa2c 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -88,7 +88,7 @@
'ACP_EXTENSION_GROUPS' => 'Manage attachment extension groups',
'ACP_EXTENSION_MANAGEMENT' => 'Extension management',
'ACP_EXTENSIONS' => 'Manage extensions',
- 'ACP_EXTENSIONS_GALLERY' => 'Extensions gallery',
+ 'ACP_EXTENSIONS_CATALOG' => 'Extensions catalog',
'ACP_EXTENSIONS_INSTALL' => 'Install extensions',
'ACP_EXTENSIONS_REMOVE' => 'Remove extensions',
'ACP_EXTENSIONS_UPDATE' => 'Update extensions',
diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php
index 0a94481a87d..aaeb1ec3e04 100644
--- a/phpBB/language/en/acp/extensions.php
+++ b/phpBB/language/en/acp/extensions.php
@@ -48,8 +48,8 @@
'ENABLING_EXTENSIONS' => 'Enabling extensions',
'DISABLING_EXTENSIONS' => 'Disabling extensions',
- 'EXTENSIONS_GALLERY' => 'Extensions Gallery',
- 'EXTENSIONS_GALLERY_EXPLAIN' => 'The Extensions Gallery is a tool in your phpBB Board which allows you to see all the extensions that are available for your board.',
+ 'EXTENSIONS_CATALOG' => 'Extensions Catalog',
+ 'EXTENSIONS_CATALOG_EXPLAIN' => 'Here you can browse all of the extensions available for your phpBB board. Extensions can easily be installed or removed with just a click. Adjust the Settings to allow instant enabling and purging of extensions.',
'EXTENSION' => 'Extension',
'EXTENSIONS' => 'Extensions',
@@ -150,7 +150,7 @@
'META_FIELD_NOT_SET' => 'Required meta field %s has not been set.',
'META_FIELD_INVALID' => 'Meta field %s is invalid.',
- 'EXTENSIONS_GALLERY_SETTINGS' => 'Extensions gallery settings',
+ 'EXTENSIONS_CATALOG_SETTINGS' => 'Extensions catalog settings',
'ENABLE_ON_INSTALL' => 'Enable extensions when installing',
'PURGE_ON_REMOVE' => 'Purge extensions when removing',
'ENABLE_PACKAGIST' => 'Enable Packagist usage',
diff --git a/phpBB/phpbb/db/migration/data/v320/extensions_composer.php b/phpBB/phpbb/db/migration/data/v320/extensions_composer.php
index 976dcfaa3ec..71456afd49a 100644
--- a/phpBB/phpbb/db/migration/data/v320/extensions_composer.php
+++ b/phpBB/phpbb/db/migration/data/v320/extensions_composer.php
@@ -29,7 +29,7 @@ public function update_data()
'ACP_EXTENSION_MANAGEMENT',
array(
'module_basename' => 'acp_extensions',
- 'modes' => array('gallery'),
+ 'modes' => array('catalog'),
),
)),
);
From f1e80830b754ffaaa5653ce41359c67d37541373 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Wed, 16 Sep 2015 11:38:01 +0200
Subject: [PATCH 147/431] [ticket/11150] Wording
PHPBB3-11150
---
phpBB/language/en/acp/common.php | 2 +-
phpBB/language/en/acp/extensions.php | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 53ac2f3fa2c..22b78fe218c 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -248,7 +248,7 @@
'COMPOSER_UNSUPPORTED_OPERATION' => 'Operation unsupported for the package type “%s”.',
'COMPOSER_UPDATING_DEPENDENCIES' => 'Updating packages',
- 'COMPOSER_LOADING_REPOSITORIES' => 'Loading remote packages information',
+ 'COMPOSER_LOADING_REPOSITORIES' => 'Loading remote repositories with package information',
'COMPOSER_ERROR_CONFLICT' => 'Your requirements could not be resolved to an installable set of packages.',
'COMPOSER_REPOSITORY_UNAVAILABLE' => 'An error occurred when fetching the repository %s.',
'COMPOSER_INSTALLING_PACKAGE' => ' - Installing %1$s (%2$s)',
diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php
index aaeb1ec3e04..0a3a43c3a7b 100644
--- a/phpBB/language/en/acp/extensions.php
+++ b/phpBB/language/en/acp/extensions.php
@@ -38,11 +38,11 @@
'EXTENSION_ALREADY_INSTALLED' => 'The “%s” extension has already been installed.',
'EXTENSION_ALREADY_INSTALLED_MANUALLY' => 'The “%s” extension has already been installed manually.',
- 'EXTENSION_ALREADY_MANAGED' => 'The “%s” extension has already been installed manually.',
- 'EXTENSION_CANNOT_MANAGE_FILESYSTEM_ERROR' => 'The “%s” extension cannot be managed because the old files cannot be removed.',
- 'EXTENSION_CANNOT_MANAGE_INSTALL_ERROR' => 'The “%s” extension cannot be installed. The old extension have been restored.',
+ 'EXTENSION_ALREADY_MANAGED' => 'The “%s” extension is already managed.',
+ 'EXTENSION_CANNOT_MANAGE_FILESYSTEM_ERROR' => 'The “%s” extension cannot be managed because the existing files could not be removed from the filesystem.',
+ 'EXTENSION_CANNOT_MANAGE_INSTALL_ERROR' => 'The “%s” extension could not be installed. The prior installation of this extension has been restored.',
'EXTENSION_MANAGED_WITH_CLEAN_ERROR' => 'The “%1$s” extension has been installed but an error occurred and the old files have not been removed. You might want to delete the “%2$s” files manually.',
- 'EXTENSION_MANAGED_WITH_ENABLE_ERROR' => 'The “%s” extension has been installed but an error occurred when re-enabling it.',
+ 'EXTENSION_MANAGED_WITH_ENABLE_ERROR' => 'The “%s” extension has been installed but an error occurred when enabling it.',
'EXTENSION_NOT_INSTALLED' => 'The “%s” extension is not installed.',
'ENABLING_EXTENSIONS' => 'Enabling extensions',
From c88c692ad6fda740880c62ba4c1f45d3aa0b3633 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Wed, 16 Sep 2015 11:46:03 +0200
Subject: [PATCH 148/431] [ticket/11150] Use json instead of serialize
PHPBB3-11150
---
phpBB/includes/acp/acp_extensions.php | 4 ++--
phpBB/phpbb/composer/installer.php | 4 ++--
phpBB/phpbb/db/migration/data/v320/extensions_composer.php | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index aaac3b04fd8..69a1063e4df 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -605,7 +605,7 @@ public function catalog_mode($id, $mode)
$this->config->set('exts_composer_enable_on_install', $enable_on_install);
$this->config->set('exts_composer_purge_on_remove', $purge_on_remove);
- $this->config->set('exts_composer_repositories', serialize($repositories));
+ $this->config->set('exts_composer_repositories', json_encode($repositories, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
if (!$this->config['exts_composer_packagist'] && $enable_packagist)
{
@@ -651,7 +651,7 @@ public function catalog_mode($id, $mode)
'enable_packagist' => $this->config['exts_composer_packagist'],
'enable_on_install' => $this->config['exts_composer_enable_on_install'],
'purge_on_remove' => $this->config['exts_composer_purge_on_remove'],
- 'repositories' => unserialize($this->config['exts_composer_repositories']),
+ 'repositories' => json_decode($this->config['exts_composer_repositories'], true),
]);
$this->template->assign_var('enabled', $manager->check_requirements());
diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php
index 9a02060316d..9bfff313379 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -77,7 +77,7 @@ public function __construct($root_path, config $config = null)
{
if ($config)
{
- $repositories = unserialize($config['exts_composer_repositories']);
+ $repositories = json_decode($config['exts_composer_repositories'], true);
if (!is_array($repositories) && !empty($repositories))
{
@@ -606,7 +606,7 @@ protected function get_extra_dependencies()
*
* @param array $repositories An array of composer repositories to use
*/
- public function set_repositories($repositories)
+ public function set_repositories(array $repositories)
{
$this->repositories = $repositories;
}
diff --git a/phpBB/phpbb/db/migration/data/v320/extensions_composer.php b/phpBB/phpbb/db/migration/data/v320/extensions_composer.php
index 71456afd49a..438c412158b 100644
--- a/phpBB/phpbb/db/migration/data/v320/extensions_composer.php
+++ b/phpBB/phpbb/db/migration/data/v320/extensions_composer.php
@@ -18,7 +18,7 @@ class extensions_composer extends \phpbb\db\migration\migration
public function update_data()
{
return array(
- array('config.add', array('exts_composer_repositories', serialize([]))),
+ array('config.add', array('exts_composer_repositories', json_encode([], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES))),
array('config.add', array('exts_composer_packagist', true)),
array('config.add', array('exts_composer_json_file', 'composer-ext.json')),
array('config.add', array('exts_composer_vendor_dir', 'vendor-ext/')),
From ab60adb60c995bf6f6ed039d125f5e16110b2729 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Wed, 16 Sep 2015 13:59:35 +0200
Subject: [PATCH 149/431] [ticket/11150] Add html output formatter
PHPBB3-11150
---
phpBB/includes/acp/acp_extensions.php | 8 +++---
.../composer/io/html_output_formatter.php | 27 +++++++++++++++++++
2 files changed, 31 insertions(+), 4 deletions(-)
create mode 100644 phpBB/phpbb/composer/io/html_output_formatter.php
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 69a1063e4df..2e93f2a09db 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -436,7 +436,7 @@ public function catalog_mode($id, $mode)
redirect($this->u_action);
}
- $formatter = new \Composer\Console\HtmlOutputFormatter([
+ $formatter = new \phpbb\composer\io\html_output_formatter([
'warning' => new \Symfony\Component\Console\Formatter\OutputFormatterStyle('black', 'yellow')
]);
@@ -475,7 +475,7 @@ public function catalog_mode($id, $mode)
redirect($this->u_action);
}
- $formatter = new \Composer\Console\HtmlOutputFormatter([
+ $formatter = new \phpbb\composer\io\html_output_formatter([
'warning' => new \Symfony\Component\Console\Formatter\OutputFormatterStyle('black', 'yellow')
]);
@@ -514,7 +514,7 @@ public function catalog_mode($id, $mode)
redirect($this->u_action);
}
- $formatter = new \Composer\Console\HtmlOutputFormatter([
+ $formatter = new \phpbb\composer\io\html_output_formatter([
'warning' => new \Symfony\Component\Console\Formatter\OutputFormatterStyle('black', 'yellow')
]);
@@ -553,7 +553,7 @@ public function catalog_mode($id, $mode)
redirect($this->u_action);
}
- $formatter = new \Composer\Console\HtmlOutputFormatter([
+ $formatter = new \phpbb\composer\io\html_output_formatter([
'warning' => new \Symfony\Component\Console\Formatter\OutputFormatterStyle('black', 'yellow')
]);
diff --git a/phpBB/phpbb/composer/io/html_output_formatter.php b/phpBB/phpbb/composer/io/html_output_formatter.php
new file mode 100644
index 00000000000..5431d3210d9
--- /dev/null
+++ b/phpBB/phpbb/composer/io/html_output_formatter.php
@@ -0,0 +1,27 @@
+
+ * @license GNU General Public License, version 2 (GPL-2.0)
+ *
+ * For full copyright and license information, please see
+ * the docs/CREDITS.txt file.
+ *
+ */
+
+namespace phpbb\composer\io;
+
+class html_output_formatter extends \Composer\Console\HtmlOutputFormatter
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function format($message)
+ {
+ $formatted = parent::format($message);
+
+ return preg_replace_callback("{[\033\e]\[([0-9;]+)m(.*?)[\033\e]\[[0-9;]+m}s", array($this, 'formatHtml'), $formatted);
+ }
+}
From a5a678c0d8008f8caaa382e3a7d334b22619ada2 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Wed, 16 Sep 2015 14:02:36 +0200
Subject: [PATCH 150/431] [ticket/11150] Translate Enabling/disabling extension
PHPBB3-11150
---
phpBB/phpbb/composer/extension_manager.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/phpBB/phpbb/composer/extension_manager.php b/phpBB/phpbb/composer/extension_manager.php
index 8a6a09680b6..cc9c5ba55c4 100644
--- a/phpBB/phpbb/composer/extension_manager.php
+++ b/phpBB/phpbb/composer/extension_manager.php
@@ -97,7 +97,7 @@ public function post_install(array $packages, IOInterface $io = null)
{
if ($this->enable_on_install)
{
- $io->writeError('ENABLING_EXTENSIONS', true, 1);
+ $io->writeError(['ENABLING_EXTENSIONS', [], 1], true);
foreach ($packages as $package)
{
try
@@ -121,7 +121,7 @@ public function post_install(array $packages, IOInterface $io = null)
*/
protected function pre_update(array $packages, IOInterface $io = null)
{
- $io->writeError('DISABLING_EXTENSIONS', true, 1);
+ $io->writeError(['DISABLING_EXTENSIONS', [], 1], true, 1);
$this->enabled_extensions = [];
foreach ($packages as $package)
{
@@ -149,7 +149,7 @@ protected function pre_update(array $packages, IOInterface $io = null)
*/
protected function post_update(array $packages, IOInterface $io = null)
{
- $io->writeError('ENABLING_EXTENSIONS', true, 1);
+ $io->writeError(['ENABLING_EXTENSIONS', [], 1], true, 1);
foreach ($this->enabled_extensions as $package)
{
try
@@ -190,7 +190,7 @@ public function pre_remove(array $packages, IOInterface $io = null)
{
if ($this->purge_on_remove)
{
- $io->writeError('DISABLING_EXTENSIONS', true, 1);
+ $io->writeError(['DISABLING_EXTENSIONS', [], 1], true, 1);
}
foreach ($packages as $package)
From 6bbd8486b2914ec52dbf839be903dd9a9dedc790 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Wed, 16 Sep 2015 14:29:56 +0200
Subject: [PATCH 151/431] [ticket/11150] Filter out versions incompatibles with
the minimum stability flag
PHPBB3-11150
---
phpBB/phpbb/composer/installer.php | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php
index 9bfff313379..74ea5316732 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -18,6 +18,7 @@
use Composer\IO\IOInterface;
use Composer\IO\NullIO;
use Composer\Json\JsonFile;
+use Composer\Package\BasePackage;
use Composer\Package\CompletePackage;
use Composer\Package\LinkConstraint\LinkConstraintInterface;
use Composer\Package\PackageInterface;
@@ -290,6 +291,7 @@ protected function do_get_available_packages($type)
/** @var LinkConstraintInterface $core_constraint */
$core_constraint = $composer->getPackage()->getRequires()['phpbb/phpbb']->getConstraint();
+ $core_stability = $composer->getPackage()->getMinimumStability();
$available = [];
@@ -321,7 +323,7 @@ protected function do_get_available_packages($type)
foreach (JsonFile::parseJson($json, $url)['packageNames'] as $package)
{
$versions = $repository->findPackages($package);
- $compatible_packages = $this->get_compatible_versions($compatible_packages, $core_constraint, $package, $versions);
+ $compatible_packages = $this->get_compatible_versions($compatible_packages, $core_constraint, $core_stability, $package, $versions);
}
}
}
@@ -341,7 +343,7 @@ protected function do_get_available_packages($type)
// Filter the compatibles versions
foreach ($packages as $package => $versions)
{
- $compatible_packages = $this->get_compatible_versions($compatible_packages, $core_constraint, $package, $versions);
+ $compatible_packages = $this->get_compatible_versions($compatible_packages, $core_constraint, $core_stability, $package, $versions);
}
}
}
@@ -422,16 +424,24 @@ public function check_requirements()
*
* @param array $compatible_packages List of compatibles versions
* @param LinkConstraintInterface $core_constraint Constraint against the phpBB version
+ * @param string $core_stability Core stability
* @param string $package_name Considered package
* @param array $versions List of available versions
*
* @return array
*/
- private function get_compatible_versions(array $compatible_packages, LinkConstraintInterface $core_constraint, $package_name, array $versions)
+ private function get_compatible_versions(array $compatible_packages, LinkConstraintInterface $core_constraint, $core_stability, $package_name, array $versions)
{
+ $core_stability_value = BasePackage::$stabilities[$core_stability];
+ //VersionParser::parseStability($version['version'])
/** @var PackageInterface $version */
foreach ($versions as $version)
{
+ if (BasePackage::$stabilities[$version->getStability()] > $core_stability_value)
+ {
+ continue;
+ }
+
if (array_key_exists('phpbb/phpbb', $version->getRequires()))
{
/** @var LinkConstraintInterface $package_constraint */
From 317c90cf4897edac76ed3245e10819e0a967f1c8 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Wed, 16 Sep 2015 15:01:26 +0200
Subject: [PATCH 152/431] [ticket/11150] Makes minimum-stability configurable
PHPBB3-11150
---
phpBB/adm/style/acp_ext_catalog.html | 15 +++++++++++++++
phpBB/includes/acp/acp_extensions.php | 17 +++++++++++++++++
phpBB/language/en/acp/extensions.php | 10 ++++++++++
phpBB/phpbb/composer/installer.php | 7 +++++++
phpBB/phpbb/composer/manager.php | 12 ++++++++++++
phpBB/phpbb/composer/manager_interface.php | 5 +++++
6 files changed, 66 insertions(+)
diff --git a/phpBB/adm/style/acp_ext_catalog.html b/phpBB/adm/style/acp_ext_catalog.html
index 23b966c615b..fff5c551a6b 100644
--- a/phpBB/adm/style/acp_ext_catalog.html
+++ b/phpBB/adm/style/acp_ext_catalog.html
@@ -62,6 +62,21 @@ {{lang( 'EXTENSIONS_CATALOG') }}
{{ lang('NO') }}
+
+
+ {{ lang('COMPOSER_MINIMUM_STABILITY') }}{{ lang('COLON') }}
+
+ {{ lang('WARNING') }}{{ lang('COLON') }} {{ lang('COMPOSER_MINIMUM_STABILITY_EXPLAIN') }}
+
+
+
+
+ {% for stability in settings.stabilities %}
+ {{ lang('STABILITY_' ~ stability|upper) }}
+ {% endfor %}
+
+
+
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 2e93f2a09db..79c51bfd707 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -587,6 +587,8 @@ public function catalog_mode($id, $mode)
if (!$this->config['exts_composer_packagist'] && $this->request->is_set('enable_packagist') && confirm_box(true))
{
$this->config->set('exts_composer_packagist', true);
+ $composer_manager->reset_cache();
+
trigger_error($language->lang('CONFIG_UPDATED') . adm_back_link($this->u_action));
}
@@ -601,12 +603,25 @@ public function catalog_mode($id, $mode)
$enable_packagist = $this->request->variable('enable_packagist', false);
$enable_on_install = $this->request->variable('enable_on_install', false);
$purge_on_remove = $this->request->variable('purge_on_remove', false);
+ $minimum_stability = $this->request->variable('minimum_stability', 'stable');
$repositories = array_unique(explode("\n", $this->request->variable('repositories', '')));
+ $previous_minimum_stability = $this->config['exts_composer_minimum_stability'];
+ $previous_repositories = $this->config['exts_composer_repositories'];
+ $previous_enable_packagist = $this->config['exts_composer_packagist'];
+
$this->config->set('exts_composer_enable_on_install', $enable_on_install);
$this->config->set('exts_composer_purge_on_remove', $purge_on_remove);
+ $this->config->set('exts_composer_minimum_stability', $minimum_stability);
$this->config->set('exts_composer_repositories', json_encode($repositories, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
+ if ($minimum_stability != $previous_minimum_stability
+ || $repositories != $previous_repositories
+ || $enable_packagist != $previous_enable_packagist)
+ {
+ $composer_manager->reset_cache();
+ }
+
if (!$this->config['exts_composer_packagist'] && $enable_packagist)
{
$s_hidden_fields = build_hidden_fields(array(
@@ -651,6 +666,8 @@ public function catalog_mode($id, $mode)
'enable_packagist' => $this->config['exts_composer_packagist'],
'enable_on_install' => $this->config['exts_composer_enable_on_install'],
'purge_on_remove' => $this->config['exts_composer_purge_on_remove'],
+ 'minimum_stability' => $this->config['exts_composer_minimum_stability'],
+ 'stabilities' => array_keys(\Composer\Package\BasePackage::$stabilities),
'repositories' => json_decode($this->config['exts_composer_repositories'], true),
]);
$this->template->assign_var('enabled', $manager->check_requirements());
diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php
index 0a3a43c3a7b..53ba5bf859f 100644
--- a/phpBB/language/en/acp/extensions.php
+++ b/phpBB/language/en/acp/extensions.php
@@ -165,4 +165,14 @@
'EXTENSIONS_UPDATED' => 'Extensions successfully updated.',
'EXTENSIONS_COMPOSER_NOT_WRITABLE' => 'TODO: some required files / directory are not writable => disable ',
+
+ 'STABILITY_STABLE' => 'stable',
+ 'STABILITY_RC' => 'RC',
+ 'STABILITY_BETA' => 'beta',
+ 'STABILITY_ALPHA' => 'alpha',
+ 'STABILITY_DEV' => 'dev',
+
+ 'COMPOSER_MINIMUM_STABILITY' => 'Minimum stability',
+ 'COMPOSER_MINIMUM_STABILITY_EXPLAIN' => 'TODO: why it is dangerous to change that',
+
));
diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php
index 74ea5316732..2b805288da5 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -55,6 +55,11 @@ class installer
*/
protected $packages_vendor_dir = 'vendor-ext/';
+ /**
+ * @var string Minimum stability
+ */
+ protected $minimum_stability = 'stable';
+
/**
* @var string phpBB root path
*/
@@ -88,6 +93,7 @@ public function __construct($root_path, config $config = null)
$this->packagist = (bool) $config['exts_composer_packagist'];
$this->composer_filename = $config['exts_composer_json_file'];
$this->packages_vendor_dir = $config['exts_composer_vendor_dir'];
+ $this->minimum_stability = $config['exts_composer_minimum_stability'];
}
$this->root_path = $root_path;
@@ -484,6 +490,7 @@ protected function generate_ext_json_file(array $packages)
'cache-dir' => 'store/composer',
'vendor-dir'=> $this->packages_vendor_dir,
],
+ 'minimum-stability' => $this->minimum_stability,
];
$this->ext_json_file_backup = null;
diff --git a/phpBB/phpbb/composer/manager.php b/phpBB/phpbb/composer/manager.php
index cffc6c85663..fbd14c57836 100644
--- a/phpBB/phpbb/composer/manager.php
+++ b/phpBB/phpbb/composer/manager.php
@@ -263,6 +263,18 @@ public function get_available_packages()
return $this->available_packages;
}
+ /**
+ * {@inheritdoc}
+ */
+ public function reset_cache()
+ {
+ $this->cache->destroy('_composer_' . $this->package_type . '_available');
+
+ $this->available_packages = null;
+ $this->managed_packages = null;
+ $this->all_managed_packages = null;
+ }
+
/**
* {@inheritdoc}
*/
diff --git a/phpBB/phpbb/composer/manager_interface.php b/phpBB/phpbb/composer/manager_interface.php
index ab36f58dc9a..9fae7a0e9c1 100644
--- a/phpBB/phpbb/composer/manager_interface.php
+++ b/phpBB/phpbb/composer/manager_interface.php
@@ -78,6 +78,11 @@ public function get_all_managed_packages();
*/
public function get_available_packages();
+ /**
+ * Reset the cache
+ */
+ public function reset_cache();
+
/**
* Start managing a manually installed package
*
From 972f3a7ff42515d9c1a94eb69ea9077d07422a6a Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Wed, 16 Sep 2015 15:12:37 +0200
Subject: [PATCH 153/431] [ticket/11150] Fix Html output formatter
PHPBB3-11150
---
phpBB/phpbb/composer/extension_manager.php | 12 ++---
.../composer/io/html_output_formatter.php | 54 +++++++++++++++++++
.../composer/io/translate_composer_trait.php | 2 +-
3 files changed, 61 insertions(+), 7 deletions(-)
diff --git a/phpBB/phpbb/composer/extension_manager.php b/phpBB/phpbb/composer/extension_manager.php
index cc9c5ba55c4..a1f67c6681b 100644
--- a/phpBB/phpbb/composer/extension_manager.php
+++ b/phpBB/phpbb/composer/extension_manager.php
@@ -97,7 +97,7 @@ public function post_install(array $packages, IOInterface $io = null)
{
if ($this->enable_on_install)
{
- $io->writeError(['ENABLING_EXTENSIONS', [], 1], true);
+ $io->writeError([['ENABLING_EXTENSIONS', [], 1]], true);
foreach ($packages as $package)
{
try
@@ -121,7 +121,7 @@ public function post_install(array $packages, IOInterface $io = null)
*/
protected function pre_update(array $packages, IOInterface $io = null)
{
- $io->writeError(['DISABLING_EXTENSIONS', [], 1], true, 1);
+ $io->writeError([['DISABLING_EXTENSIONS', [], 1]], true, 1);
$this->enabled_extensions = [];
foreach ($packages as $package)
{
@@ -149,7 +149,7 @@ protected function pre_update(array $packages, IOInterface $io = null)
*/
protected function post_update(array $packages, IOInterface $io = null)
{
- $io->writeError(['ENABLING_EXTENSIONS', [], 1], true, 1);
+ $io->writeError([['ENABLING_EXTENSIONS', [], 1]], true, 1);
foreach ($this->enabled_extensions as $package)
{
try
@@ -190,7 +190,7 @@ public function pre_remove(array $packages, IOInterface $io = null)
{
if ($this->purge_on_remove)
{
- $io->writeError(['DISABLING_EXTENSIONS', [], 1], true, 1);
+ $io->writeError([['DISABLING_EXTENSIONS', [], 1]], true, 1);
}
foreach ($packages as $package)
@@ -239,7 +239,7 @@ public function start_managing($package, $io)
if ($this->extension_manager->is_enabled($package))
{
$enabled = true;
- $io->writeError('DISABLING_EXTENSION', true, 1);
+ $io->writeError([['DISABLING_EXTENSIONS', [], 1]], true, 1);
$this->extension_manager->disable($package);
}
@@ -274,7 +274,7 @@ public function start_managing($package, $io)
{
try
{
- $io->writeError('ENABLING_EXTENSION', true, 1);
+ $io->writeError([['ENABLING_EXTENSIONS', [], 1]], true, 1);
$this->extension_manager->enable($package);
}
catch (\Exception $e)
diff --git a/phpBB/phpbb/composer/io/html_output_formatter.php b/phpBB/phpbb/composer/io/html_output_formatter.php
index 5431d3210d9..d3066f969d2 100644
--- a/phpBB/phpbb/composer/io/html_output_formatter.php
+++ b/phpBB/phpbb/composer/io/html_output_formatter.php
@@ -15,6 +15,36 @@
class html_output_formatter extends \Composer\Console\HtmlOutputFormatter
{
+ protected static $availableForegroundColors = [
+ 30 => 'black',
+ 31 => 'red',
+ 32 => 'green',
+ 33 => 'yellow',
+ 34 => 'blue',
+ 35 => 'magenta',
+ 36 => 'cyan',
+ 37 => 'white'
+ ];
+
+ protected static $availableBackgroundColors = [
+ 40 => 'black',
+ 41 => 'red',
+ 42 => 'green',
+ 43 => 'yellow',
+ 44 => 'blue',
+ 45 => 'magenta',
+ 46 => 'cyan',
+ 47 => 'white'
+ ];
+
+ protected static $availableOptions = [
+ 1 => 'bold',
+ 4 => 'underscore',
+ //5 => 'blink',
+ //7 => 'reverse',
+ //8 => 'conceal'
+ ];
+
/**
* {@inheritdoc}
*/
@@ -24,4 +54,28 @@ public function format($message)
return preg_replace_callback("{[\033\e]\[([0-9;]+)m(.*?)[\033\e]\[[0-9;]+m}s", array($this, 'formatHtml'), $formatted);
}
+
+ protected function formatHtml($matches)
+ {
+ $out = ''.$matches[2].' ';
+ }
}
diff --git a/phpBB/phpbb/composer/io/translate_composer_trait.php b/phpBB/phpbb/composer/io/translate_composer_trait.php
index 0f2d6f8e643..64f69263e9a 100644
--- a/phpBB/phpbb/composer/io/translate_composer_trait.php
+++ b/phpBB/phpbb/composer/io/translate_composer_trait.php
@@ -114,7 +114,7 @@ public function writeError($messages, $newline = true)
$parameters = [];
}
- $message = trim($this->strip_format($message), "\n\r");
+ $message = trim($this->strip_format($lang_key), "\n\r");
if (strpos($message, ' Problem ') === 0)
{
From 9a836b5901afa7977a086db8cb9c57df0d5c7072 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Wed, 16 Sep 2015 16:25:45 +0200
Subject: [PATCH 154/431] [ticket/11150] Makes composer output level
configurable
PHPBB3-11150
---
phpBB/config/development/config.yml | 4 +++
phpBB/includes/acp/acp_extensions.php | 8 +++---
phpBB/phpbb/composer/extension_manager.php | 26 +++++++++----------
.../composer/io/translate_composer_trait.php | 17 +++++++++---
.../di/extension/container_configuration.php | 7 +++++
phpBB/phpbb/di/extension/core.php | 13 ++++++++++
6 files changed, 55 insertions(+), 20 deletions(-)
diff --git a/phpBB/config/development/config.yml b/phpBB/config/development/config.yml
index f39eb52e736..1e144d68d6c 100644
--- a/phpBB/config/development/config.yml
+++ b/phpBB/config/development/config.yml
@@ -11,3 +11,7 @@ core:
debug: true
auto_reload: true
enable_debug_extension: true
+
+ extensions:
+ composer_debug: true
+ composer_verbose: true
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 79c51bfd707..15a9d74623e 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -440,7 +440,7 @@ public function catalog_mode($id, $mode)
'warning' => new \Symfony\Component\Console\Formatter\OutputFormatterStyle('black', 'yellow')
]);
- $composer_io = new \phpbb\composer\io\web_io($language, '', \Symfony\Component\Console\Output\OutputInterface::VERBOSITY_VERBOSE, $formatter);
+ $composer_io = new \phpbb\composer\io\web_io($language, '', $phpbb_container->getParameter('extensions.composer.output'), $formatter);
try
{
@@ -479,7 +479,7 @@ public function catalog_mode($id, $mode)
'warning' => new \Symfony\Component\Console\Formatter\OutputFormatterStyle('black', 'yellow')
]);
- $composer_io = new \phpbb\composer\io\web_io($language, '', \Symfony\Component\Console\Output\OutputInterface::VERBOSITY_VERBOSE, $formatter);
+ $composer_io = new \phpbb\composer\io\web_io($language, '', $phpbb_container->getParameter('extensions.composer.output'), $formatter);
try
{
@@ -518,7 +518,7 @@ public function catalog_mode($id, $mode)
'warning' => new \Symfony\Component\Console\Formatter\OutputFormatterStyle('black', 'yellow')
]);
- $composer_io = new \phpbb\composer\io\web_io($language, '', \Symfony\Component\Console\Output\OutputInterface::VERBOSITY_VERBOSE, $formatter);
+ $composer_io = new \phpbb\composer\io\web_io($language, '', $phpbb_container->getParameter('extensions.composer.output'), $formatter);
try
{
@@ -557,7 +557,7 @@ public function catalog_mode($id, $mode)
'warning' => new \Symfony\Component\Console\Formatter\OutputFormatterStyle('black', 'yellow')
]);
- $composer_io = new \phpbb\composer\io\web_io($language, '', \Symfony\Component\Console\Output\OutputInterface::VERBOSITY_VERBOSE, $formatter);
+ $composer_io = new \phpbb\composer\io\web_io($language, '', $phpbb_container->getParameter('extensions.composer.output'), $formatter);
try
{
diff --git a/phpBB/phpbb/composer/extension_manager.php b/phpBB/phpbb/composer/extension_manager.php
index a1f67c6681b..7e148e0d54e 100644
--- a/phpBB/phpbb/composer/extension_manager.php
+++ b/phpBB/phpbb/composer/extension_manager.php
@@ -106,11 +106,11 @@ public function post_install(array $packages, IOInterface $io = null)
}
catch (\phpbb\exception\runtime_exception $e)
{
- $io->writeError([$e->getMessage(), $e->get_parameters()], true, 4);
+ $io->writeError([[$e->getMessage(), $e->get_parameters(), 4]], true);
}
catch (\Exception $e)
{
- $io->writeError($e->getMessage(), true, 4);
+ $io->writeError([[$e->getMessage(), [], 4]], true);
}
}
}
@@ -121,7 +121,7 @@ public function post_install(array $packages, IOInterface $io = null)
*/
protected function pre_update(array $packages, IOInterface $io = null)
{
- $io->writeError([['DISABLING_EXTENSIONS', [], 1]], true, 1);
+ $io->writeError([['DISABLING_EXTENSIONS', [], 1]], true);
$this->enabled_extensions = [];
foreach ($packages as $package)
{
@@ -135,11 +135,11 @@ protected function pre_update(array $packages, IOInterface $io = null)
}
catch (\phpbb\exception\runtime_exception $e)
{
- $io->writeError([$e->getMessage(), $e->get_parameters()], true, 4);
+ $io->writeError([[$e->getMessage(), $e->get_parameters(), 4]], true);
}
catch (\Exception $e)
{
- $io->writeError($e->getMessage(), true, 4);
+ $io->writeError([[$e->getMessage(), [], 4]], true);
}
}
}
@@ -149,7 +149,7 @@ protected function pre_update(array $packages, IOInterface $io = null)
*/
protected function post_update(array $packages, IOInterface $io = null)
{
- $io->writeError([['ENABLING_EXTENSIONS', [], 1]], true, 1);
+ $io->writeError([['ENABLING_EXTENSIONS', [], 1]], true);
foreach ($this->enabled_extensions as $package)
{
try
@@ -158,11 +158,11 @@ protected function post_update(array $packages, IOInterface $io = null)
}
catch (\phpbb\exception\runtime_exception $e)
{
- $io->writeError([$e->getMessage(), $e->get_parameters()], true, 4);
+ $io->writeError([[$e->getMessage(), $e->get_parameters(), 4]], true);
}
catch (\Exception $e)
{
- $io->writeError($e->getMessage(), true, 4);
+ $io->writeError([[$e->getMessage(), [], 4]], true);
}
}
}
@@ -190,7 +190,7 @@ public function pre_remove(array $packages, IOInterface $io = null)
{
if ($this->purge_on_remove)
{
- $io->writeError([['DISABLING_EXTENSIONS', [], 1]], true, 1);
+ $io->writeError([['DISABLING_EXTENSIONS', [], 1]], true);
}
foreach ($packages as $package)
@@ -211,11 +211,11 @@ public function pre_remove(array $packages, IOInterface $io = null)
}
catch (\phpbb\exception\runtime_exception $e)
{
- $io->writeError([$e->getMessage(), $e->get_parameters()], true, 4);
+ $io->writeError([[$e->getMessage(), $e->get_parameters(), 4]], true);
}
catch (\Exception $e)
{
- $io->writeError($e->getMessage(), true, 4);
+ $io->writeError([[$e->getMessage(), [], 4]], true);
}
}
}
@@ -239,7 +239,7 @@ public function start_managing($package, $io)
if ($this->extension_manager->is_enabled($package))
{
$enabled = true;
- $io->writeError([['DISABLING_EXTENSIONS', [], 1]], true, 1);
+ $io->writeError([['DISABLING_EXTENSIONS', [], 1]], true);
$this->extension_manager->disable($package);
}
@@ -274,7 +274,7 @@ public function start_managing($package, $io)
{
try
{
- $io->writeError([['ENABLING_EXTENSIONS', [], 1]], true, 1);
+ $io->writeError([['ENABLING_EXTENSIONS', [], 1]], true);
$this->extension_manager->enable($package);
}
catch (\Exception $e)
diff --git a/phpBB/phpbb/composer/io/translate_composer_trait.php b/phpBB/phpbb/composer/io/translate_composer_trait.php
index 64f69263e9a..fd06dd95ce6 100644
--- a/phpBB/phpbb/composer/io/translate_composer_trait.php
+++ b/phpBB/phpbb/composer/io/translate_composer_trait.php
@@ -16,6 +16,9 @@
use phpbb\language\language;
use Symfony\Component\Console\Output\OutputInterface;
+/**
+ * Trait to translate the composer Output
+ */
trait translate_composer_trait
{
/**
@@ -54,9 +57,13 @@ public function write($messages, $newline = true)
$parameters = [];
}
- $message = trim($this->strip_format($message), "\n\r");
+ $message = trim($this->strip_format($lang_key), "\n\r");
- if (strpos($message, 'Deleting ') === 0)
+ if ($this->output->getVerbosity() === OutputInterface::VERBOSITY_DEBUG)
+ {
+ // Do nothing
+ }
+ else if (strpos($message, 'Deleting ') === 0)
{
$elements = explode(' ', $message);
$lang_key = 'COMPOSER_DELETING';
@@ -116,7 +123,11 @@ public function writeError($messages, $newline = true)
$message = trim($this->strip_format($lang_key), "\n\r");
- if (strpos($message, ' Problem ') === 0)
+ if ($this->output->getVerbosity() === OutputInterface::VERBOSITY_DEBUG)
+ {
+ // Do nothing
+ }
+ else if (strpos($message, ' Problem ') === 0)
{
if ($this->output->getVerbosity() < OutputInterface::VERBOSITY_VERBOSE)
{
diff --git a/phpBB/phpbb/di/extension/container_configuration.php b/phpBB/phpbb/di/extension/container_configuration.php
index 4585d6509e0..3870670ac00 100644
--- a/phpBB/phpbb/di/extension/container_configuration.php
+++ b/phpBB/phpbb/di/extension/container_configuration.php
@@ -45,6 +45,13 @@ public function getConfigTreeBuilder()
->booleanNode('enable_debug_extension')->defaultValue(false)->end()
->end()
->end()
+ ->arrayNode('extensions')
+ ->addDefaultsIfNotSet()
+ ->children()
+ ->booleanNode('composer_debug')->defaultValue(false)->end()
+ ->booleanNode('composer_verbose')->defaultValue(false)->end()
+ ->end()
+ ->end()
->end()
;
return $treeBuilder;
diff --git a/phpBB/phpbb/di/extension/core.php b/phpBB/phpbb/di/extension/core.php
index 67150f0103d..64c3dafcad8 100644
--- a/phpBB/phpbb/di/extension/core.php
+++ b/phpBB/phpbb/di/extension/core.php
@@ -15,6 +15,7 @@
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Config\Resource\FileResource;
+use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
@@ -92,6 +93,18 @@ public function load(array $configs, ContainerBuilder $container)
$definition->addTag('twig.extension');
}
+ $composer_output = OutputInterface::VERBOSITY_NORMAL;
+ if ($config['extensions']['composer_verbose'])
+ {
+ $composer_output = OutputInterface::VERBOSITY_VERBOSE;
+ }
+ if ($config['extensions']['composer_debug'])
+ {
+ $composer_output = OutputInterface::VERBOSITY_DEBUG;
+ }
+
+ $container->setParameter('extensions.composer.output', $composer_output);
+
// Set the debug options
foreach ($config['debug'] as $name => $value)
{
From 60086b5c41f467b28a70397c5fa6e734dc76a9dc Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Thu, 17 Sep 2015 09:33:44 +0200
Subject: [PATCH 155/431] [ticket/11150] Add language key
PHPBB3-11150
---
phpBB/language/en/acp/extensions.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php
index 53ba5bf859f..135631ba522 100644
--- a/phpBB/language/en/acp/extensions.php
+++ b/phpBB/language/en/acp/extensions.php
@@ -173,6 +173,8 @@
'STABILITY_DEV' => 'dev',
'COMPOSER_MINIMUM_STABILITY' => 'Minimum stability',
- 'COMPOSER_MINIMUM_STABILITY_EXPLAIN' => 'TODO: why it is dangerous to change that',
+ 'COMPOSER_MINIMUM_STABILITY_EXPLAIN' => 'Always use stable versions on a live forum.
+Non-stable versions may still be in development and could cause unexpected problems with your
+forum and should only be used for development purposes in local or staging environments.',
));
From fc1d79cf474894c5cbf14e8122de2b6f3b39963b Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Thu, 17 Sep 2015 09:37:18 +0200
Subject: [PATCH 156/431] [ticket/11150] Correctly enable/purge extensions
PHPBB3-11150
---
phpBB/phpbb/composer/extension_manager.php | 6 +++---
phpBB/phpbb/composer/manager.php | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/phpBB/phpbb/composer/extension_manager.php b/phpBB/phpbb/composer/extension_manager.php
index 7e148e0d54e..a1ceb06d91c 100644
--- a/phpBB/phpbb/composer/extension_manager.php
+++ b/phpBB/phpbb/composer/extension_manager.php
@@ -98,7 +98,7 @@ public function post_install(array $packages, IOInterface $io = null)
if ($this->enable_on_install)
{
$io->writeError([['ENABLING_EXTENSIONS', [], 1]], true);
- foreach ($packages as $package)
+ foreach ($packages as $package => $version)
{
try
{
@@ -123,7 +123,7 @@ protected function pre_update(array $packages, IOInterface $io = null)
{
$io->writeError([['DISABLING_EXTENSIONS', [], 1]], true);
$this->enabled_extensions = [];
- foreach ($packages as $package)
+ foreach ($packages as $package => $version)
{
try
{
@@ -193,7 +193,7 @@ public function pre_remove(array $packages, IOInterface $io = null)
$io->writeError([['DISABLING_EXTENSIONS', [], 1]], true);
}
- foreach ($packages as $package)
+ foreach ($packages as $package => $version)
{
try
{
diff --git a/phpBB/phpbb/composer/manager.php b/phpBB/phpbb/composer/manager.php
index fbd14c57836..c9d917e5c9c 100644
--- a/phpBB/phpbb/composer/manager.php
+++ b/phpBB/phpbb/composer/manager.php
@@ -291,7 +291,7 @@ public function check_requirements()
return $this->installer->check_requirements();
}
- protected function normalize_version($packages)
+ protected function normalize_version(array $packages)
{
$normalized_packages = [];
From dbfe2d7947561c60be92b6ffe7ba05f07eca4e87 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Thu, 17 Sep 2015 09:41:32 +0200
Subject: [PATCH 157/431] [ticket/11150] Yellow => Orange in composer output
PHPBB3-11150
---
phpBB/phpbb/composer/io/html_output_formatter.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phpBB/phpbb/composer/io/html_output_formatter.php b/phpBB/phpbb/composer/io/html_output_formatter.php
index d3066f969d2..6106392b4c6 100644
--- a/phpBB/phpbb/composer/io/html_output_formatter.php
+++ b/phpBB/phpbb/composer/io/html_output_formatter.php
@@ -19,7 +19,7 @@ class html_output_formatter extends \Composer\Console\HtmlOutputFormatter
30 => 'black',
31 => 'red',
32 => 'green',
- 33 => 'yellow',
+ 33 => 'orange',
34 => 'blue',
35 => 'magenta',
36 => 'cyan',
From 0926e94955b01ee6e2d51b35187c4338f5a92cc7 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Thu, 17 Sep 2015 10:17:32 +0200
Subject: [PATCH 158/431] [ticket/11150] CS
PHPBB3-11150
---
phpBB/language/en/acp/extensions.php | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php
index 135631ba522..8322be7753f 100644
--- a/phpBB/language/en/acp/extensions.php
+++ b/phpBB/language/en/acp/extensions.php
@@ -173,8 +173,6 @@
'STABILITY_DEV' => 'dev',
'COMPOSER_MINIMUM_STABILITY' => 'Minimum stability',
- 'COMPOSER_MINIMUM_STABILITY_EXPLAIN' => 'Always use stable versions on a live forum.
-Non-stable versions may still be in development and could cause unexpected problems with your
-forum and should only be used for development purposes in local or staging environments.',
+ 'COMPOSER_MINIMUM_STABILITY_EXPLAIN' => 'Always use stable versions on a live forum. Non-stable versions may still be in development and could cause unexpected problems with your forum and should only be used for development purposes in local or staging environments.',
));
From ba0f151c39b5fb1b48109157ddb5af673cd71668 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Thu, 17 Sep 2015 10:55:49 +0200
Subject: [PATCH 159/431] [ticket/11150] Adds an overflow to composer output
PHPBB3-11150
---
phpBB/adm/style/detailled_message_body.html | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/phpBB/adm/style/detailled_message_body.html b/phpBB/adm/style/detailled_message_body.html
index f5f42eff2ef..5fc0b1b2ec5 100644
--- a/phpBB/adm/style/detailled_message_body.html
+++ b/phpBB/adm/style/detailled_message_body.html
@@ -5,11 +5,13 @@ {{ MESSAGE_TITLE }}
{{ MESSAGE_TEXT }}
-
- {%- if MESSAGE_DETAIL_LEGEND -%}
- {{ MESSAGE_DETAIL_LEGEND|nl2br }}
- {%- endif -%}
- {{ MESSAGE_DETAIL }}
-
+
+
+ {%- if MESSAGE_DETAIL_LEGEND -%}
+ {{ MESSAGE_DETAIL_LEGEND|nl2br }}
+ {%- endif -%}
+ {{ MESSAGE_DETAIL }}
+
+
From b10719d03dd1b9184ea89e33502dc6ac003ba113 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Thu, 17 Sep 2015 10:58:42 +0200
Subject: [PATCH 160/431] [ticket/11150] Don't display remove for enabled
extensions
PHPBB3-11150
---
phpBB/adm/style/acp_ext_list.html | 6 ------
1 file changed, 6 deletions(-)
diff --git a/phpBB/adm/style/acp_ext_list.html b/phpBB/adm/style/acp_ext_list.html
index 9f22c037228..eb2e75cff55 100644
--- a/phpBB/adm/style/acp_ext_list.html
+++ b/phpBB/adm/style/acp_ext_list.html
@@ -62,12 +62,6 @@ {L_EXTENSIONS_ADMIN}
title="{enabled.actions.L_ACTION_EXPLAIN}">{enabled.actions.L_ACTION}
|
-
-
- |
- {L_UPDATE}
- | {L_REMOVE}
-
From 65cd20539f3b45d5cc32b321095f3585c918968b Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Thu, 17 Sep 2015 11:00:17 +0200
Subject: [PATCH 161/431] [ticket/11150] Purge on remove by default
PHPBB3-11150
---
phpBB/phpbb/composer/extension_manager.php | 2 +-
phpBB/phpbb/db/migration/data/v320/extensions_composer.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/phpBB/phpbb/composer/extension_manager.php b/phpBB/phpbb/composer/extension_manager.php
index a1ceb06d91c..96250e9dd3f 100644
--- a/phpBB/phpbb/composer/extension_manager.php
+++ b/phpBB/phpbb/composer/extension_manager.php
@@ -51,7 +51,7 @@ class extension_manager extends manager
/**
* @var bool Purges extensions data when removing them?
*/
- private $purge_on_remove = false;
+ private $purge_on_remove = true;
/**
* @param installer $installer Installer object
diff --git a/phpBB/phpbb/db/migration/data/v320/extensions_composer.php b/phpBB/phpbb/db/migration/data/v320/extensions_composer.php
index 438c412158b..8b7065d335a 100644
--- a/phpBB/phpbb/db/migration/data/v320/extensions_composer.php
+++ b/phpBB/phpbb/db/migration/data/v320/extensions_composer.php
@@ -23,7 +23,7 @@ public function update_data()
array('config.add', array('exts_composer_json_file', 'composer-ext.json')),
array('config.add', array('exts_composer_vendor_dir', 'vendor-ext/')),
array('config.add', array('exts_composer_enable_on_install', false)),
- array('config.add', array('exts_composer_purge_on_remove', false)),
+ array('config.add', array('exts_composer_purge_on_remove', true)),
array('module.add', array(
'acp',
'ACP_EXTENSION_MANAGEMENT',
From 8b96fc7d040de2d8b68732dfa1269782298a8be3 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Thu, 17 Sep 2015 11:02:43 +0200
Subject: [PATCH 162/431] [ticket/11150] Add missing config entries
PHPBB3-11150
---
phpBB/install/schemas/schema_data.sql | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index fe62484afb7..c4eff64c14f 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -281,6 +281,12 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_system_cron',
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.3.0-a1-dev');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('exts_composer_repositories', '[]');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('exts_composer_packagist', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('exts_composer_json_file', 'composer-ext.json');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('exts_composer_vendor_dir', 'vendor-ext/');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('exts_composer_enable_on_install', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('exts_composer_purge_on_remove', '1');
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('cache_last_gc', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('cron_lock', '0', 1);
From bac391c2820ce0693289e2ba67bf949b8868316c Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Fri, 18 Sep 2015 09:33:44 +0200
Subject: [PATCH 163/431] [ticket/11150] CS
PHPBB3-11150
---
phpBB/adm/style/acp_ext_catalog.html | 6 ++---
phpBB/includes/acp/acp_extensions.php | 26 ++++++++++++----------
phpBB/phpbb/composer/manager_interface.php | 16 ++++++++-----
3 files changed, 28 insertions(+), 20 deletions(-)
diff --git a/phpBB/adm/style/acp_ext_catalog.html b/phpBB/adm/style/acp_ext_catalog.html
index fff5c551a6b..b47a241c555 100644
--- a/phpBB/adm/style/acp_ext_catalog.html
+++ b/phpBB/adm/style/acp_ext_catalog.html
@@ -2,15 +2,15 @@
-{{lang( 'EXTENSIONS_CATALOG') }}
+{{ lang( 'EXTENSIONS_CATALOG') }}
-{{lang( 'EXTENSIONS_CATALOG_EXPLAIN') }}
+{{ lang( 'EXTENSIONS_CATALOG_EXPLAIN') }}
{% if not enabled %}
{{ lang('EXTENSIONS_COMPOSER_NOT_WRITABLE') }}
-{% endif %}
+{% endif %}I
{{ lang('BROWSE_EXTENSIONS_DATABASE') }} • {{ lang('SETTINGS') }}
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 15a9d74623e..d9fe8df0398 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -658,19 +658,21 @@ public function catalog_mode($id, $mode)
$this->page_title = 'ACP_EXTENSIONS_CATALOG';
$this->tpl_name = 'acp_ext_catalog';
- $this->template->assign_var('extensions', $extensions);
- $this->template->assign_var('managed_extensions', array_keys($managed_packages));
- $this->template->assign_var('installed_extensions', array_keys($extensions_manager->all_available()));
- $this->template->assign_var('U_ACTION', $this->u_action);
- $this->template->assign_var('settings', [
- 'enable_packagist' => $this->config['exts_composer_packagist'],
- 'enable_on_install' => $this->config['exts_composer_enable_on_install'],
- 'purge_on_remove' => $this->config['exts_composer_purge_on_remove'],
- 'minimum_stability' => $this->config['exts_composer_minimum_stability'],
- 'stabilities' => array_keys(\Composer\Package\BasePackage::$stabilities),
- 'repositories' => json_decode($this->config['exts_composer_repositories'], true),
+ $this->template->assign_vars([
+ 'enabled' => $manager->check_requirements(),
+ 'extensions' => $extensions,
+ 'managed_extensions' => array_keys($managed_packages),
+ 'installed_extensions' => array_keys($extensions_manager->all_available()),
+ 'U_ACTION' => $this->u_action,
+ 'settings' => [
+ 'enable_packagist' => $this->config['exts_composer_packagist'],
+ 'enable_on_install' => $this->config['exts_composer_enable_on_install'],
+ 'purge_on_remove' => $this->config['exts_composer_purge_on_remove'],
+ 'minimum_stability' => $this->config['exts_composer_minimum_stability'],
+ 'stabilities' => array_keys(\Composer\Package\BasePackage::$stabilities),
+ 'repositories' => json_decode($this->config['exts_composer_repositories'], true),
+ ],
]);
- $this->template->assign_var('enabled', $manager->check_requirements());
add_form_key('catalog_settings');
diff --git a/phpBB/phpbb/composer/manager_interface.php b/phpBB/phpbb/composer/manager_interface.php
index 9fae7a0e9c1..3cb401f2b6d 100644
--- a/phpBB/phpbb/composer/manager_interface.php
+++ b/phpBB/phpbb/composer/manager_interface.php
@@ -1,15 +1,21 @@
+ * @license GNU General Public License, version 2 (GPL-2.0)
+ *
+ * For full copyright and license information, please see
+ * the docs/CREDITS.txt file.
+ *
*/
+
namespace phpbb\composer;
+
use Composer\IO\IOInterface;
use phpbb\composer\exception\runtime_exception;
-
/**
* Class to manage packages through composer.
*/
From e71e6224f596677e5bed90f4087c1b6eac5e1e93 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Fri, 25 Sep 2015 19:20:36 +0200
Subject: [PATCH 164/431] [ticket/11150] Remove 'Update' and 'Remove' actions
in the catalog
PHPBB3-11150
---
phpBB/adm/style/acp_ext_catalog.html | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/phpBB/adm/style/acp_ext_catalog.html b/phpBB/adm/style/acp_ext_catalog.html
index b47a241c555..345c32b0678 100644
--- a/phpBB/adm/style/acp_ext_catalog.html
+++ b/phpBB/adm/style/acp_ext_catalog.html
@@ -109,14 +109,11 @@ {{ lang( 'EXTENSIONS_CATALOG') }}
{% if extension.name in managed_extensions %}
{{ lang('INSTALLED') }}
- {%- if enabled -%}
- ({{ lang('UPDATE') }}
- • {{ lang('REMOVE') }} )
- {%- endif -%}
{% elseif extension.name in installed_extensions -%}
{{ lang('INSTALLED_MANUALLY') }}
{%- if enabled -%}
- ({{ lang('MANAGE') }} ){%- endif -%}
+ ({{ lang('MANAGE') }} )
+ {%- endif -%}
{% elseif enabled -%}
{{ lang('INSTALL') }}
{%- endif -%}
From 7958dca09d354fdf3804937496380d941fa08caf Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Fri, 25 Sep 2015 19:36:05 +0200
Subject: [PATCH 165/431] [ticket/11150] Load vendor/ext-autoload.php
PHPBB3-11150
---
phpBB/bin/phpbbcli.php | 5 +++++
phpBB/common.php | 5 +++++
phpBB/download/file.php | 5 +++++
phpBB/phpbb/composer/installer.php | 3 ++-
phpBB/phpbb/di/container_builder.php | 6 ++++++
5 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php
index 6bd217ec07d..1b3fac51e01 100755
--- a/phpBB/bin/phpbbcli.php
+++ b/phpBB/bin/phpbbcli.php
@@ -71,6 +71,11 @@
register_compatibility_globals();
+if (is_file($phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php'))
+{
+ require_once($phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php');
+}
+
/** @var \phpbb\language\language $language */
$language = $phpbb_container->get('language');
$language->add_lang(array('common', 'acp/common', 'cli'));
diff --git a/phpBB/common.php b/phpBB/common.php
index 70feb55d04f..30293cae519 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -141,6 +141,11 @@
register_compatibility_globals();
+if (is_file($phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php'))
+{
+ require_once($phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php');
+}
+
// Add own hook handler
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
diff --git a/phpBB/download/file.php b/phpBB/download/file.php
index a9cd4a3b3cc..fbbabfb74f1 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -99,6 +99,11 @@
/* @var $phpbb_avatar_manager \phpbb\avatar\manager */
$phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
+ if (is_file($phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php'))
+ {
+ require_once($phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php');
+ }
+
$filename = $request->variable('avatar', '');
$avatar_group = false;
$exit = false;
diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php
index 2b805288da5..730d708d108 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -161,7 +161,8 @@ protected function do_install(array $packages, $whitelist, IOInterface $io = nul
->setUpdateWhitelist($whitelist)
->setWhitelistDependencies(false)
->setIgnorePlatformRequirements(false)
- ->setDumpAutoloader(false)
+ ->setOptimizeAutoloader(true)
+ ->setDumpAutoloader(true)
->setPreferStable(true)
->setRunScripts(false)
->setDryRun(false);
diff --git a/phpBB/phpbb/di/container_builder.php b/phpBB/phpbb/di/container_builder.php
index ac1a1a1733e..08400320b72 100644
--- a/phpBB/phpbb/di/container_builder.php
+++ b/phpBB/phpbb/di/container_builder.php
@@ -415,6 +415,12 @@ protected function load_extensions()
$ext_container->register('cache.driver', '\\phpbb\\cache\\driver\\dummy');
$ext_container->compile();
+ $config = $ext_container->get('config');
+ if (is_file($this->phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php'))
+ {
+ require_once($this->phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php');
+ }
+
$extensions = $ext_container->get('ext.manager')->all_enabled();
// Load each extension found
From 8ea2ecf8351ed78bfb856dfb14c998275ba449c9 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Tue, 8 Dec 2015 20:40:35 +0100
Subject: [PATCH 166/431] [ticket/11150] Disable packagist and add titania
PHPBB3-11150
---
phpBB/adm/style/acp_ext_catalog.html | 2 +-
.../default/container/services_console.yml | 28 +++++++------
.../default/container/services_extensions.yml | 40 +++++++++----------
phpBB/language/en/acp/extensions.php | 2 +-
phpBB/phpbb/composer/installer.php | 12 +++---
.../data/v320/extensions_composer.php | 6 ++-
6 files changed, 47 insertions(+), 43 deletions(-)
diff --git a/phpBB/adm/style/acp_ext_catalog.html b/phpBB/adm/style/acp_ext_catalog.html
index 345c32b0678..326d6b8bc7b 100644
--- a/phpBB/adm/style/acp_ext_catalog.html
+++ b/phpBB/adm/style/acp_ext_catalog.html
@@ -10,7 +10,7 @@ {{ lang( 'EXTENSIONS_CATALOG') }}
{{ lang('EXTENSIONS_COMPOSER_NOT_WRITABLE') }}
-{% endif %}I
+{% endif %}
{{ lang('BROWSE_EXTENSIONS_DATABASE') }} • {{ lang('SETTINGS') }}
diff --git a/phpBB/config/default/container/services_console.yml b/phpBB/config/default/container/services_console.yml
index a59fe3cd7e0..94c7c61812d 100644
--- a/phpBB/config/default/container/services_console.yml
+++ b/phpBB/config/default/container/services_console.yml
@@ -144,26 +144,27 @@ services:
console.command.extension.install:
class: phpbb\console\command\extension\install
arguments:
- - @user
- - @ext.composer.manager
+ - '@user'
+ - '@ext.composer.manager'
+ - '@language'
tags:
- { name: console.command }
console.command.extension.list_available:
class: phpbb\console\command\extension\list_available
arguments:
- - @user
- - @ext.composer.manager
- - @language
+ - '@user'
+ - '@ext.composer.manager'
+ - '@language'
tags:
- { name: console.command }
console.command.extension.manage:
class: phpbb\console\command\extension\manage
arguments:
- - @user
- - @ext.composer.manager
- - @language
+ - '@user'
+ - '@ext.composer.manager'
+ - '@language'
tags:
- { name: console.command }
@@ -179,9 +180,9 @@ services:
console.command.extension.remove:
class: phpbb\console\command\extension\remove
arguments:
- - @user
- - @ext.composer.manager
- - @language
+ - '@user'
+ - '@ext.composer.manager'
+ - '@language'
tags:
- { name: console.command }
@@ -197,8 +198,9 @@ services:
console.command.extension.update:
class: phpbb\console\command\extension\update
arguments:
- - @user
- - @ext.composer.manager
+ - '@user'
+ - '@ext.composer.manager'
+ - '@language'
tags:
- { name: console.command }
diff --git a/phpBB/config/default/container/services_extensions.yml b/phpBB/config/default/container/services_extensions.yml
index b97ae1fa9c3..a28fd019d8e 100644
--- a/phpBB/config/default/container/services_extensions.yml
+++ b/phpBB/config/default/container/services_extensions.yml
@@ -2,45 +2,45 @@ services:
ext.manager:
class: phpbb\extension\manager
arguments:
- - @service_container
- - @dbal.conn
- - @config
- - @filesystem
- - %tables.ext%
- - %core.root_path%
- - %core.php_ext%
- - @cache
+ - '@service_container'
+ - '@dbal.conn'
+ - '@config'
+ - '@filesystem'
+ - '%tables.ext%'
+ - '%core.root_path%'
+ - '%core.php_ext%'
+ - '@cache'
ext.composer.installer:
class: phpbb\composer\installer
arguments:
- - %core.root_path%
- - @config
+ - '%core.root_path%'
+ - '@config'
ext.composer.manager:
class: phpbb\composer\extension_manager
arguments:
- - @ext.composer.installer
- - @cache.driver
- - @ext.manager
- - @filesystem
+ - '@ext.composer.installer'
+ - '@cache.driver'
+ - '@ext.manager'
+ - '@filesystem'
- phpbb-extension
- EXTENSIONS_
- - %core.root_path%
- - @config
+ - '%core.root_path%'
+ - '@config'
style.composer.manager:
class: phpbb\composer\manager
arguments:
- - @ext.composer.installer
- - @cache.driver
+ - '@ext.composer.installer'
+ - '@cache.driver'
- phpbb-style
- STYLES_
lang.composer.manager:
class: phpbb\composer\manager
arguments:
- - @ext.composer.installer
- - @cache.driver
+ - '@ext.composer.installer'
+ - '@cache.driver'
- phpbb-language
- LANGUAGES_
diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php
index 8322be7753f..a32676f31a8 100644
--- a/phpBB/language/en/acp/extensions.php
+++ b/phpBB/language/en/acp/extensions.php
@@ -164,7 +164,7 @@
'EXTENSIONS_REMOVED' => 'Extensions successfully removed.',
'EXTENSIONS_UPDATED' => 'Extensions successfully updated.',
- 'EXTENSIONS_COMPOSER_NOT_WRITABLE' => 'TODO: some required files / directory are not writable => disable ',
+ 'EXTENSIONS_COMPOSER_NOT_WRITABLE' => 'In order to use the catalog, the following files and directories must be writable: ext/ vendor-ext/ composer-ext.json and composer-ext.json.lock',
'STABILITY_STABLE' => 'stable',
'STABILITY_RC' => 'RC',
diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php
index 730d708d108..3605af135b7 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -20,10 +20,10 @@
use Composer\Json\JsonFile;
use Composer\Package\BasePackage;
use Composer\Package\CompletePackage;
-use Composer\Package\LinkConstraint\LinkConstraintInterface;
use Composer\Package\PackageInterface;
use Composer\Repository\ComposerRepository;
use Composer\Repository\RepositoryInterface;
+use Composer\Semver\Constraint\ConstraintInterface;
use Composer\Util\RemoteFilesystem;
use phpbb\config\config;
use phpbb\exception\runtime_exception;
@@ -85,7 +85,7 @@ public function __construct($root_path, config $config = null)
{
$repositories = json_decode($config['exts_composer_repositories'], true);
- if (!is_array($repositories) && !empty($repositories))
+ if (is_array($repositories) && !empty($repositories))
{
$this->repositories = (array) $repositories;
}
@@ -296,7 +296,7 @@ protected function do_get_available_packages($type)
$io = new NullIO();
$composer = Factory::create($io, $this->get_composer_ext_json_filename(), false);
- /** @var LinkConstraintInterface $core_constraint */
+ /** @var ConstraintInterface $core_constraint */
$core_constraint = $composer->getPackage()->getRequires()['phpbb/phpbb']->getConstraint();
$core_stability = $composer->getPackage()->getMinimumStability();
@@ -430,14 +430,14 @@ public function check_requirements()
* Updates $compatible_packages with the versions of $versions compatibles with the $core_constraint
*
* @param array $compatible_packages List of compatibles versions
- * @param LinkConstraintInterface $core_constraint Constraint against the phpBB version
+ * @param ConstraintInterface $core_constraint Constraint against the phpBB version
* @param string $core_stability Core stability
* @param string $package_name Considered package
* @param array $versions List of available versions
*
* @return array
*/
- private function get_compatible_versions(array $compatible_packages, LinkConstraintInterface $core_constraint, $core_stability, $package_name, array $versions)
+ private function get_compatible_versions(array $compatible_packages, ConstraintInterface $core_constraint, $core_stability, $package_name, array $versions)
{
$core_stability_value = BasePackage::$stabilities[$core_stability];
//VersionParser::parseStability($version['version'])
@@ -451,7 +451,7 @@ private function get_compatible_versions(array $compatible_packages, LinkConstra
if (array_key_exists('phpbb/phpbb', $version->getRequires()))
{
- /** @var LinkConstraintInterface $package_constraint */
+ /** @var ConstraintInterface $package_constraint */
$package_constraint = $version->getRequires()['phpbb/phpbb']->getConstraint();
if (!$package_constraint->matches($core_constraint))
diff --git a/phpBB/phpbb/db/migration/data/v320/extensions_composer.php b/phpBB/phpbb/db/migration/data/v320/extensions_composer.php
index 8b7065d335a..957d1416837 100644
--- a/phpBB/phpbb/db/migration/data/v320/extensions_composer.php
+++ b/phpBB/phpbb/db/migration/data/v320/extensions_composer.php
@@ -18,8 +18,10 @@ class extensions_composer extends \phpbb\db\migration\migration
public function update_data()
{
return array(
- array('config.add', array('exts_composer_repositories', json_encode([], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES))),
- array('config.add', array('exts_composer_packagist', true)),
+ array('config.add', array('exts_composer_repositories', json_encode([
+ 'https://www.phpbb.com/customise/db/composer/',
+ ], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES))),
+ array('config.add', array('exts_composer_packagist', false)),
array('config.add', array('exts_composer_json_file', 'composer-ext.json')),
array('config.add', array('exts_composer_vendor_dir', 'vendor-ext/')),
array('config.add', array('exts_composer_enable_on_install', false)),
From ea4a4acee012e74a4624e71bc34c259f8d877166 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Wed, 9 Dec 2015 19:39:05 +0100
Subject: [PATCH 167/431] [ticket/11150] CS and wording
PHPBB3-11150
---
...sage_body.html => detailed_message_body.html} | 0
phpBB/includes/acp/acp_extensions.php | 16 ++++++++--------
phpBB/language/en/acp/common.php | 2 +-
phpBB/language/en/acp/extensions.php | 6 +++---
phpBB/phpbb/composer/installer.php | 6 +++---
5 files changed, 15 insertions(+), 15 deletions(-)
rename phpBB/adm/style/{detailled_message_body.html => detailed_message_body.html} (100%)
diff --git a/phpBB/adm/style/detailled_message_body.html b/phpBB/adm/style/detailed_message_body.html
similarity index 100%
rename from phpBB/adm/style/detailled_message_body.html
rename to phpBB/adm/style/detailed_message_body.html
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index d9fe8df0398..fe0a6184cdd 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -62,10 +62,10 @@ function main()
{
case 'catalog':
$this->catalog_mode($id, $mode);
- break;
+ break;
default:
$this->main_mode($id, $mode);
- break;
+ break;
}
}
@@ -155,7 +155,7 @@ public function main_mode($id, $mode)
$this->config->set('extension_force_unstable', false);
trigger_error($this->user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
}
- break;
+ break;
case 'list':
default:
@@ -464,7 +464,7 @@ public function catalog_mode($id, $mode)
)
);
- break;
+ break;
case 'remove':
$this->page_title = 'ACP_EXTENSIONS_REMOVE';
@@ -503,7 +503,7 @@ public function catalog_mode($id, $mode)
)
);
- break;
+ break;
case 'update':
$this->page_title = 'ACP_EXTENSIONS_UPDATE';
@@ -542,7 +542,7 @@ public function catalog_mode($id, $mode)
)
);
- break;
+ break;
case 'manage':
$this->page_title = 'ACP_EXTENSIONS_MANAGE';
@@ -581,7 +581,7 @@ public function catalog_mode($id, $mode)
)
);
- break;
+ break;
case 'list':
default:
if (!$this->config['exts_composer_packagist'] && $this->request->is_set('enable_packagist') && confirm_box(true))
@@ -676,7 +676,7 @@ public function catalog_mode($id, $mode)
add_form_key('catalog_settings');
- break;
+ break;
}
}
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 22b78fe218c..69391970349 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -250,7 +250,7 @@
'COMPOSER_UPDATING_DEPENDENCIES' => 'Updating packages',
'COMPOSER_LOADING_REPOSITORIES' => 'Loading remote repositories with package information',
'COMPOSER_ERROR_CONFLICT' => 'Your requirements could not be resolved to an installable set of packages.',
- 'COMPOSER_REPOSITORY_UNAVAILABLE' => 'An error occurred when fetching the repository %s.',
+ 'COMPOSER_REPOSITORY_UNAVAILABLE' => 'An error occurred while fetching the repository %s.',
'COMPOSER_INSTALLING_PACKAGE' => ' - Installing %1$s (%2$s)',
'COMPOSER_DELETING' => ' - Deleting %s',
'COMPOSER_UPDATE_NOTHING' => 'Nothing to update',
diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php
index a32676f31a8..280a483d895 100644
--- a/phpBB/language/en/acp/extensions.php
+++ b/phpBB/language/en/acp/extensions.php
@@ -41,15 +41,15 @@
'EXTENSION_ALREADY_MANAGED' => 'The “%s” extension is already managed.',
'EXTENSION_CANNOT_MANAGE_FILESYSTEM_ERROR' => 'The “%s” extension cannot be managed because the existing files could not be removed from the filesystem.',
'EXTENSION_CANNOT_MANAGE_INSTALL_ERROR' => 'The “%s” extension could not be installed. The prior installation of this extension has been restored.',
- 'EXTENSION_MANAGED_WITH_CLEAN_ERROR' => 'The “%1$s” extension has been installed but an error occurred and the old files have not been removed. You might want to delete the “%2$s” files manually.',
- 'EXTENSION_MANAGED_WITH_ENABLE_ERROR' => 'The “%s” extension has been installed but an error occurred when enabling it.',
+ 'EXTENSION_MANAGED_WITH_CLEAN_ERROR' => 'The “%1$s” extension has been installed but an error occurred and the old files could not be removed. You might want to delete the “%2$s” files manually.',
+ 'EXTENSION_MANAGED_WITH_ENABLE_ERROR' => 'The “%s” extension has been installed but an error occurred while enabling it.',
'EXTENSION_NOT_INSTALLED' => 'The “%s” extension is not installed.',
'ENABLING_EXTENSIONS' => 'Enabling extensions',
'DISABLING_EXTENSIONS' => 'Disabling extensions',
'EXTENSIONS_CATALOG' => 'Extensions Catalog',
- 'EXTENSIONS_CATALOG_EXPLAIN' => 'Here you can browse all of the extensions available for your phpBB board. Extensions can easily be installed or removed with just a click. Adjust the Settings to allow instant enabling and purging of extensions.',
+ 'EXTENSIONS_CATALOG_EXPLAIN' => 'Here you can browse all of the extensions available for your phpBB board. Extensions can easily be installed or removed with just a click. Adjust the settings to allow instant enabling and purging of extensions.',
'EXTENSION' => 'Extension',
'EXTENSIONS' => 'Extensions',
diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php
index 3605af135b7..18a66d1bf8f 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -76,14 +76,14 @@ class installer
private $ext_json_file_backup;
/**
- * @param \phpbb\config\config $config Config object
- * @param string $root_path phpBB root path
+ * @param string $root_path phpBB root path
+ * @param config $config Config object
*/
public function __construct($root_path, config $config = null)
{
if ($config)
{
- $repositories = json_decode($config['exts_composer_repositories'], true);
+ $repositories = json_decode($config['exts_composer_repositories'], true);
if (is_array($repositories) && !empty($repositories))
{
From b5136e4976d803ac92d8bb4a61ecf647ee08ce98 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Wed, 9 Dec 2015 22:44:58 +0100
Subject: [PATCH 168/431] [ticket/11150] Fix CS
PHPBB3-11150
---
phpBB/ext/index.htm | 0
.../phpbb/composer/io/html_output_formatter.php | 17 ++++++++++++-----
.../composer/io/translate_composer_trait.php | 6 ++----
.../command/extension/list_available.php | 6 ------
.../phpbb/console/command/extension/manage.php | 1 -
5 files changed, 14 insertions(+), 16 deletions(-)
mode change 100755 => 100644 phpBB/ext/index.htm
diff --git a/phpBB/ext/index.htm b/phpBB/ext/index.htm
old mode 100755
new mode 100644
diff --git a/phpBB/phpbb/composer/io/html_output_formatter.php b/phpBB/phpbb/composer/io/html_output_formatter.php
index 6106392b4c6..c20ad83c898 100644
--- a/phpBB/phpbb/composer/io/html_output_formatter.php
+++ b/phpBB/phpbb/composer/io/html_output_formatter.php
@@ -58,13 +58,20 @@ public function format($message)
protected function formatHtml($matches)
{
$out = '
Date: Fri, 11 Dec 2015 20:12:25 +0100
Subject: [PATCH 169/431] [ticket/11150] Case insentitive sort
PHPBB3-11150
---
phpBB/phpbb/composer/installer.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php
index 18a66d1bf8f..1179d592f52 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -399,7 +399,7 @@ protected function do_get_available_packages($type)
usort($available, function($a, $b)
{
- return strcmp($a['display_name'], $b['display_name']);
+ return strcasecmp($a['display_name'], $b['display_name']);
});
return $available;
From 4617037febab3ca9746d9cb03b98536d99ba64a2 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Fri, 11 Dec 2015 20:12:42 +0100
Subject: [PATCH 170/431] [ticket/11150] Console liek output
PHPBB3-11150
---
phpBB/adm/style/admin.css | 7 +++++++
phpBB/adm/style/detailed_message_body.html | 7 ++-----
phpBB/includes/acp/acp_extensions.php | 10 +++++-----
3 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index 290fee2983e..f115a6f72cd 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -2969,3 +2969,10 @@ fieldset.permissions .permissions-switch {
/* stylelint-enable selector-no-qualifying-type */
/* stylelint-enable declaration-property-unit-blacklist */
/* stylelint-enable declaration-property-unit-whitelist */
+
+.console-output {
+ background-color: #2a2a2a;
+ color: #f1f1f1;
+ font-family: monospace;
+ overflow-x:scroll;
+}
diff --git a/phpBB/adm/style/detailed_message_body.html b/phpBB/adm/style/detailed_message_body.html
index 5fc0b1b2ec5..bc904d7eb62 100644
--- a/phpBB/adm/style/detailed_message_body.html
+++ b/phpBB/adm/style/detailed_message_body.html
@@ -5,11 +5,8 @@ {{ MESSAGE_TITLE }}
{{ MESSAGE_TEXT }}
-
-
- {%- if MESSAGE_DETAIL_LEGEND -%}
- {{ MESSAGE_DETAIL_LEGEND|nl2br }}
- {%- endif -%}
+
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index fe0a6184cdd..1bcbe9f4152 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -453,7 +453,7 @@ public function catalog_mode($id, $mode)
$this->display_composer_exception($language, $e, $composer_io);
return;
}
- $this->tpl_name = 'detailled_message_body';
+ $this->tpl_name = 'detailed_message_body';
$this->template->assign_vars(array(
'MESSAGE_TITLE' => $language->lang('ACP_EXTENSIONS_INSTALL'),
@@ -492,7 +492,7 @@ public function catalog_mode($id, $mode)
$this->display_composer_exception($language, $e, $composer_io);
return;
}
- $this->tpl_name = 'detailled_message_body';
+ $this->tpl_name = 'detailed_message_body';
$this->template->assign_vars(array(
'MESSAGE_TITLE' => $language->lang('ACP_EXTENSIONS_REMOVE'),
@@ -531,7 +531,7 @@ public function catalog_mode($id, $mode)
$this->display_composer_exception($language, $e, $composer_io);
return;
}
- $this->tpl_name = 'detailled_message_body';
+ $this->tpl_name = 'detailed_message_body';
$this->template->assign_vars(array(
'MESSAGE_TITLE' => $language->lang('ACP_EXTENSIONS_UPDATE'),
@@ -570,7 +570,7 @@ public function catalog_mode($id, $mode)
$this->display_composer_exception($language, $e, $composer_io);
return;
}
- $this->tpl_name = 'detailled_message_body';
+ $this->tpl_name = 'detailed_message_body';
$this->template->assign_vars(array(
'MESSAGE_TITLE' => $language->lang('ACP_EXTENSIONS_MANAGE'),
@@ -689,7 +689,7 @@ public function catalog_mode($id, $mode)
*/
private function display_composer_exception(\phpbb\language\language $language, \phpbb\exception\runtime_exception $e, \phpbb\composer\io\web_io $composer_io)
{
- $this->tpl_name = 'detailled_message_body';
+ $this->tpl_name = 'detailed_message_body';
if ($e->getPrevious())
{
From 718ca44a06b606488385bec2ecb8a505854d1583 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Tue, 15 Dec 2015 19:36:56 +0100
Subject: [PATCH 171/431] [ticket/11150] CS
PHPBB3-11150
---
phpBB/adm/style/admin.css | 1 +
.../default/container/services_extensions.yml | 1 +
phpBB/phpbb/composer/installer.php | 34 ++++++----
phpBB/phpbb/composer/io/console_io.php | 2 +-
.../composer/io/html_output_formatter.php | 65 ++++++++++---------
phpBB/phpbb/composer/io/io_interface.php | 32 +++++++++
phpBB/phpbb/composer/io/null_io.php | 32 +++++++++
phpBB/phpbb/composer/io/web_io.php | 2 +-
8 files changed, 124 insertions(+), 45 deletions(-)
create mode 100644 phpBB/phpbb/composer/io/io_interface.php
create mode 100644 phpBB/phpbb/composer/io/null_io.php
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index f115a6f72cd..aab20b36d5e 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -2975,4 +2975,5 @@ fieldset.permissions .permissions-switch {
color: #f1f1f1;
font-family: monospace;
overflow-x:scroll;
+ line-height: 1.5em;
}
diff --git a/phpBB/config/default/container/services_extensions.yml b/phpBB/config/default/container/services_extensions.yml
index a28fd019d8e..dda02340ab5 100644
--- a/phpBB/config/default/container/services_extensions.yml
+++ b/phpBB/config/default/container/services_extensions.yml
@@ -15,6 +15,7 @@ services:
class: phpbb\composer\installer
arguments:
- '%core.root_path%'
+ - '@filesystem'
- '@config'
ext.composer.manager:
diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php
index 1179d592f52..8b4c762c928 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -20,6 +20,7 @@
use Composer\Json\JsonFile;
use Composer\Package\BasePackage;
use Composer\Package\CompletePackage;
+use Composer\Package\Link;
use Composer\Package\PackageInterface;
use Composer\Repository\ComposerRepository;
use Composer\Repository\RepositoryInterface;
@@ -27,6 +28,7 @@
use Composer\Util\RemoteFilesystem;
use phpbb\config\config;
use phpbb\exception\runtime_exception;
+use phpbb\filesystem\filesystem;
/**
* Class to install packages through composer while freezing core dependencies.
@@ -76,10 +78,11 @@ class installer
private $ext_json_file_backup;
/**
- * @param string $root_path phpBB root path
- * @param config $config Config object
+ * @param string $root_path phpBB root path
+ * @param filesystem $filesystem Filesystem object
+ * @param config $config Config object
*/
- public function __construct($root_path, config $config = null)
+ public function __construct($root_path, filesystem $filesystem, config $config = null)
{
if ($config)
{
@@ -90,13 +93,15 @@ public function __construct($root_path, config $config = null)
$this->repositories = (array) $repositories;
}
- $this->packagist = (bool) $config['exts_composer_packagist'];
- $this->composer_filename = $config['exts_composer_json_file'];
- $this->packages_vendor_dir = $config['exts_composer_vendor_dir'];
- $this->minimum_stability = $config['exts_composer_minimum_stability'];
+ $this->packagist = (bool) $config['exts_composer_packagist'];
+ $this->composer_filenam = $config['exts_composer_json_file'];
+ $this->packages_vendor_dir = $config['exts_composer_vendor_dir'];
+ $this->minimum_stability = $config['exts_composer_minimum_stability'];
}
$this->root_path = $root_path;
+
+ putenv('COMPOSER_HOME=' . $filesystem->realpath($root_path) . 'store/composer');
}
/**
@@ -119,7 +124,7 @@ public function install(array $packages, $whitelist, IOInterface $io = null)
$this->do_install($packages, $whitelist, $io);
$this->restore_cwd();
}
- catch (\Exception $e)
+ catch (runtime_exception $e)
{
$this->restore_cwd();
throw $e;
@@ -175,6 +180,7 @@ protected function do_install(array $packages, $whitelist, IOInterface $io = nul
{
$this->restore_ext_json_file();
$this->restore_cwd();
+
throw new runtime_exception('COMPOSER_CANNOT_INSTALL', [], $e);
}
@@ -182,6 +188,7 @@ protected function do_install(array $packages, $whitelist, IOInterface $io = nul
{
$this->restore_ext_json_file();
$this->restore_cwd();
+
throw new runtime_exception($io->get_composer_error(), []);
}
}
@@ -192,6 +199,8 @@ protected function do_install(array $packages, $whitelist, IOInterface $io = nul
* @param string|array $types Returns only the packages with the given type(s)
*
* @return array The installed packages associated to their version.
+ *
+ * @throws runtime_exception
*/
public function get_installed_packages($types)
{
@@ -203,7 +212,7 @@ public function get_installed_packages($types)
$result = $this->do_get_installed_packages($types);
$this->restore_cwd();
}
- catch (\Exception $e)
+ catch (runtime_exception $e)
{
$this->restore_cwd();
throw $e;
@@ -231,6 +240,8 @@ protected function do_get_installed_packages($types)
$composer = Factory::create($io, $this->get_composer_ext_json_filename(), false);
$installed = [];
+
+ /** @var Link[] $required_links */
$required_links = $composer->getPackage()->getRequires();
$installed_packages = $composer->getRepositoryManager()->getLocalRepository()->getCanonicalPackages();
@@ -260,6 +271,8 @@ protected function do_get_installed_packages($types)
* @param string $type Returns only the packages with the given type
*
* @return array The name of the available packages, associated to their definition. Ordered by name.
+ *
+ * @throws runtime_exception
*/
public function get_available_packages($type)
{
@@ -271,7 +284,7 @@ public function get_available_packages($type)
$result = $this->do_get_available_packages($type);
$this->restore_cwd();
}
- catch (\Exception $e)
+ catch (runtime_exception $e)
{
$this->restore_cwd();
throw $e;
@@ -488,7 +501,6 @@ protected function generate_ext_json_file(array $packages)
'replace' => $core_packages,
'repositories' => $this->get_composer_repositories(),
'config' => [
- 'cache-dir' => 'store/composer',
'vendor-dir'=> $this->packages_vendor_dir,
],
'minimum-stability' => $this->minimum_stability,
diff --git a/phpBB/phpbb/composer/io/console_io.php b/phpBB/phpbb/composer/io/console_io.php
index 14c1ef29e9f..5239b050bb1 100644
--- a/phpBB/phpbb/composer/io/console_io.php
+++ b/phpBB/phpbb/composer/io/console_io.php
@@ -19,7 +19,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
-class console_io extends ConsoleIO
+class console_io extends ConsoleIO implements io_interface
{
use translate_composer_trait;
diff --git a/phpBB/phpbb/composer/io/html_output_formatter.php b/phpBB/phpbb/composer/io/html_output_formatter.php
index c20ad83c898..1629e1895cf 100644
--- a/phpBB/phpbb/composer/io/html_output_formatter.php
+++ b/phpBB/phpbb/composer/io/html_output_formatter.php
@@ -4,7 +4,7 @@
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited
- * @license GNU General Public License, version 2 (GPL-2.0)
+ * @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
@@ -16,34 +16,35 @@
class html_output_formatter extends \Composer\Console\HtmlOutputFormatter
{
protected static $availableForegroundColors = [
- 30 => 'black',
- 31 => 'red',
- 32 => 'green',
- 33 => 'orange',
- 34 => 'blue',
- 35 => 'magenta',
- 36 => 'cyan',
- 37 => 'white'
- ];
+ 30 => 'black',
+ 31 => 'red',
+ 32 => 'green',
+ 33 => 'orange',
+ 34 => 'blue',
+ 35 => 'magenta',
+ 36 => 'cyan',
+ 37 => 'white',
+ ];
protected static $availableBackgroundColors = [
- 40 => 'black',
- 41 => 'red',
- 42 => 'green',
- 43 => 'yellow',
- 44 => 'blue',
- 45 => 'magenta',
- 46 => 'cyan',
- 47 => 'white'
- ];
+ 40 => 'black',
+ 41 => 'red',
+ 42 => 'green',
+ 43 => 'yellow',
+ 44 => 'blue',
+ 45 => 'magenta',
+ 46 => 'cyan',
+ 47 => 'white',
+ ];
- protected static $availableOptions = [
- 1 => 'bold',
- 4 => 'underscore',
- //5 => 'blink',
- //7 => 'reverse',
- //8 => 'conceal'
- ];
+ protected static $availableOptions
+ = [
+ 1 => 'bold',
+ 4 => 'underscore',
+ //5 => 'blink',
+ //7 => 'reverse',
+ //8 => 'conceal'
+ ];
/**
* {@inheritdoc}
@@ -52,7 +53,7 @@ public function format($message)
{
$formatted = parent::format($message);
- return preg_replace_callback("{[\033\e]\[([0-9;]+)m(.*?)[\033\e]\[[0-9;]+m}s", array($this, 'formatHtml'), $formatted);
+ return preg_replace_callback("{[\033\e]\[([0-9;]+)m(.*?)[\033\e]\[[0-9;]+m}s", [$this, 'formatHtml'], $formatted);
}
protected function formatHtml($matches)
@@ -62,13 +63,13 @@ protected function formatHtml($matches)
{
if (isset(self::$availableForegroundColors[$code]))
{
- $out .= 'color:'.self::$availableForegroundColors[$code].';';
+ $out .= 'color:' . self::$availableForegroundColors[$code] . ';';
}
- elseif (isset(self::$availableBackgroundColors[$code]))
+ else if (isset(self::$availableBackgroundColors[$code]))
{
- $out .= 'background-color:'.self::$availableBackgroundColors[$code].';';
+ $out .= 'background-color:' . self::$availableBackgroundColors[$code] . ';';
}
- elseif (isset(self::$availableOptions[$code]))
+ else if (isset(self::$availableOptions[$code]))
{
switch (self::$availableOptions[$code])
{
@@ -83,6 +84,6 @@ protected function formatHtml($matches)
}
}
- return $out.'">'.$matches[2].'';
+ return $out . '">' . $matches[2] . '';
}
}
diff --git a/phpBB/phpbb/composer/io/io_interface.php b/phpBB/phpbb/composer/io/io_interface.php
new file mode 100644
index 00000000000..2b1f0c10071
--- /dev/null
+++ b/phpBB/phpbb/composer/io/io_interface.php
@@ -0,0 +1,32 @@
+
+ * @license GNU General Public License, version 2 (GPL-2.0)
+ *
+ * For full copyright and license information, please see
+ * the docs/CREDITS.txt file.
+ *
+ */
+
+namespace phpbb\composer\io;
+
+use Composer\IO\ConsoleIO;
+use Composer\IO\IOInterface;
+use Composer\IO\NullIO;
+use phpbb\language\language;
+use Symfony\Component\Console\Helper\HelperSet;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+interface io_interface extends IOInterface
+{
+ /**
+ * Returns the composer errors that occurred since the last tcall of the method.
+ *
+ * @return string
+ */
+ public function get_composer_error();
+}
diff --git a/phpBB/phpbb/composer/io/null_io.php b/phpBB/phpbb/composer/io/null_io.php
new file mode 100644
index 00000000000..d38020d5f25
--- /dev/null
+++ b/phpBB/phpbb/composer/io/null_io.php
@@ -0,0 +1,32 @@
+
+ * @license GNU General Public License, version 2 (GPL-2.0)
+ *
+ * For full copyright and license information, please see
+ * the docs/CREDITS.txt file.
+ *
+ */
+
+namespace phpbb\composer\io;
+
+use Composer\IO\ConsoleIO;
+use Composer\IO\NullIO;
+use phpbb\language\language;
+use Symfony\Component\Console\Helper\HelperSet;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class console_io extends NullIO implements io_interface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function get_composer_error()
+ {
+ return '';
+ }
+}
diff --git a/phpBB/phpbb/composer/io/web_io.php b/phpBB/phpbb/composer/io/web_io.php
index e7927c72336..4eab3d099ae 100644
--- a/phpBB/phpbb/composer/io/web_io.php
+++ b/phpBB/phpbb/composer/io/web_io.php
@@ -18,7 +18,7 @@
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
use Symfony\Component\Console\Output\StreamOutput;
-class web_io extends BufferIO
+class web_io extends BufferIO implements io_interface
{
use translate_composer_trait;
From 43038a65de77498d37beae6823ed7187bb5e2f14 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Tue, 15 Dec 2015 19:49:53 +0100
Subject: [PATCH 172/431] [ticket/11150] Update tests
PHPBB3-11150
---
.../di/fixtures/config/production/container/environment.yml | 5 +++++
tests/di/fixtures/config/test/container/environment.yml | 5 +++++
.../other_config/production/container/environment.yml | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/tests/di/fixtures/config/production/container/environment.yml b/tests/di/fixtures/config/production/container/environment.yml
index 8281d9e941d..ba6b6797955 100644
--- a/tests/di/fixtures/config/production/container/environment.yml
+++ b/tests/di/fixtures/config/production/container/environment.yml
@@ -19,6 +19,11 @@ services:
ext.manager:
class: phpbb\extension\manager_mock
+ config:
+ class: phpbb\config\config
+ arguments:
+ - []
+
template.twig.environment:
class: Exception
arguments:
diff --git a/tests/di/fixtures/config/test/container/environment.yml b/tests/di/fixtures/config/test/container/environment.yml
index 252117dd327..97ebe4aee1f 100644
--- a/tests/di/fixtures/config/test/container/environment.yml
+++ b/tests/di/fixtures/config/test/container/environment.yml
@@ -16,6 +16,11 @@ services:
dispatcher:
class: phpbb\db\driver\container_mock
+ config:
+ class: phpbb\config\config
+ arguments:
+ - []
+
template.twig.environment:
class: Exception
arguments:
diff --git a/tests/di/fixtures/other_config/production/container/environment.yml b/tests/di/fixtures/other_config/production/container/environment.yml
index c0d2f87babc..aeb552eeb73 100644
--- a/tests/di/fixtures/other_config/production/container/environment.yml
+++ b/tests/di/fixtures/other_config/production/container/environment.yml
@@ -19,6 +19,11 @@ services:
ext.manager:
class: phpbb\extension\manager_mock
+ config:
+ class: phpbb\config\config
+ arguments:
+ - []
+
template.twig.environment:
class: Exception
arguments:
From 1c9ecd084c0ae0399a5e56abcf8e4abc1ca85d1d Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Tue, 15 Dec 2015 22:05:18 +0100
Subject: [PATCH 173/431] [ticket/11150] CS
PHPBB3-11150
---
phpBB/phpbb/composer/installer.php | 16 +++++++---------
phpBB/phpbb/composer/io/io_interface.php | 6 ------
phpBB/phpbb/composer/io/null_io.php | 7 +------
.../composer/io/translate_composer_trait.php | 3 +--
4 files changed, 9 insertions(+), 23 deletions(-)
diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php
index 8b4c762c928..3e140e9a5fb 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -20,12 +20,10 @@
use Composer\Json\JsonFile;
use Composer\Package\BasePackage;
use Composer\Package\CompletePackage;
-use Composer\Package\Link;
-use Composer\Package\PackageInterface;
use Composer\Repository\ComposerRepository;
-use Composer\Repository\RepositoryInterface;
use Composer\Semver\Constraint\ConstraintInterface;
use Composer\Util\RemoteFilesystem;
+use phpbb\composer\io\null_io;
use phpbb\config\config;
use phpbb\exception\runtime_exception;
use phpbb\filesystem\filesystem;
@@ -147,7 +145,7 @@ protected function do_install(array $packages, $whitelist, IOInterface $io = nul
{
if (!$io)
{
- $io = new NullIO();
+ $io = new null_io();
}
$this->generate_ext_json_file($packages);
@@ -241,7 +239,7 @@ protected function do_get_installed_packages($types)
$installed = [];
- /** @var Link[] $required_links */
+ /** @var \Composer\Package\Link[] $required_links */
$required_links = $composer->getPackage()->getRequires();
$installed_packages = $composer->getRepositoryManager()->getLocalRepository()->getCanonicalPackages();
@@ -318,7 +316,7 @@ protected function do_get_available_packages($type)
$compatible_packages = [];
$repositories = $composer->getRepositoryManager()->getRepositories();
- /** @var RepositoryInterface $repository */
+ /** @var \Composer\Repository\RepositoryInterface $repository */
foreach ($repositories as $repository)
{
try
@@ -339,7 +337,7 @@ protected function do_get_available_packages($type)
$hostname = parse_url($url, PHP_URL_HOST) ?: $url;
$json = $rfs->getContents($hostname, $url, false);
- /** @var PackageInterface $package */
+ /** @var \Composer\Package\PackageInterface $package */
foreach (JsonFile::parseJson($json, $url)['packageNames'] as $package)
{
$versions = $repository->findPackages($package);
@@ -351,7 +349,7 @@ protected function do_get_available_packages($type)
{
// Pre-filter repo packages by their type
$packages = [];
- /** @var PackageInterface $package */
+ /** @var \Composer\Package\PackageInterface $package */
foreach ($repository->getPackages() as $package)
{
if ($package->getType() === $type)
@@ -454,7 +452,7 @@ private function get_compatible_versions(array $compatible_packages, ConstraintI
{
$core_stability_value = BasePackage::$stabilities[$core_stability];
//VersionParser::parseStability($version['version'])
- /** @var PackageInterface $version */
+ /** @var \Composer\Package\PackageInterface $version */
foreach ($versions as $version)
{
if (BasePackage::$stabilities[$version->getStability()] > $core_stability_value)
diff --git a/phpBB/phpbb/composer/io/io_interface.php b/phpBB/phpbb/composer/io/io_interface.php
index 2b1f0c10071..a1d41122cb1 100644
--- a/phpBB/phpbb/composer/io/io_interface.php
+++ b/phpBB/phpbb/composer/io/io_interface.php
@@ -13,13 +13,7 @@
namespace phpbb\composer\io;
-use Composer\IO\ConsoleIO;
use Composer\IO\IOInterface;
-use Composer\IO\NullIO;
-use phpbb\language\language;
-use Symfony\Component\Console\Helper\HelperSet;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
interface io_interface extends IOInterface
{
diff --git a/phpBB/phpbb/composer/io/null_io.php b/phpBB/phpbb/composer/io/null_io.php
index d38020d5f25..9a667ca097b 100644
--- a/phpBB/phpbb/composer/io/null_io.php
+++ b/phpBB/phpbb/composer/io/null_io.php
@@ -13,14 +13,9 @@
namespace phpbb\composer\io;
-use Composer\IO\ConsoleIO;
use Composer\IO\NullIO;
-use phpbb\language\language;
-use Symfony\Component\Console\Helper\HelperSet;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
-class console_io extends NullIO implements io_interface
+class null_io extends NullIO implements io_interface
{
/**
* {@inheritdoc}
diff --git a/phpBB/phpbb/composer/io/translate_composer_trait.php b/phpBB/phpbb/composer/io/translate_composer_trait.php
index 9f8653f5702..09cc76fa8e2 100644
--- a/phpBB/phpbb/composer/io/translate_composer_trait.php
+++ b/phpBB/phpbb/composer/io/translate_composer_trait.php
@@ -13,7 +13,6 @@
namespace phpbb\composer\io;
-use phpbb\language\language;
use Symfony\Component\Console\Output\OutputInterface;
/**
@@ -22,7 +21,7 @@
trait translate_composer_trait
{
/**
- * @var language
+ * @var \phpbb\language\language
*/
protected $language;
From f6eb17048a6c7e7d5955b7c9ecf2cab397c167d8 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Sat, 19 Dec 2015 18:38:56 +0100
Subject: [PATCH 174/431] [ticket/11150] Initialize the errors array in the
translate trait
PHPBB3-11150
---
phpBB/phpbb/composer/io/translate_composer_trait.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phpBB/phpbb/composer/io/translate_composer_trait.php b/phpBB/phpbb/composer/io/translate_composer_trait.php
index 09cc76fa8e2..56a996d91c7 100644
--- a/phpBB/phpbb/composer/io/translate_composer_trait.php
+++ b/phpBB/phpbb/composer/io/translate_composer_trait.php
@@ -28,7 +28,7 @@ trait translate_composer_trait
/**
* @var array
*/
- protected $composer_error;
+ protected $composer_error = [];
/**
* {@inheritdoc}
From fad379813f1c44887c59d9bcd90b77b96a37b640 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Tue, 22 Dec 2015 16:45:30 +0100
Subject: [PATCH 175/431] [ticket/11150] Always display an error message
PHPBB3-11150
---
phpBB/phpbb/composer/installer.php | 2 +-
.../phpbb/composer/io/translate_composer_trait.php | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php
index 3e140e9a5fb..6197b59bd51 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -99,7 +99,7 @@ public function __construct($root_path, filesystem $filesystem, config $config =
$this->root_path = $root_path;
- putenv('COMPOSER_HOME=' . $filesystem->realpath($root_path) . 'store/composer');
+ putenv('COMPOSER_HOME=' . $filesystem->realpath($root_path) . '/store/composer');
}
/**
diff --git a/phpBB/phpbb/composer/io/translate_composer_trait.php b/phpBB/phpbb/composer/io/translate_composer_trait.php
index 56a996d91c7..9a0f63ceb57 100644
--- a/phpBB/phpbb/composer/io/translate_composer_trait.php
+++ b/phpBB/phpbb/composer/io/translate_composer_trait.php
@@ -121,9 +121,14 @@ public function writeError($messages, $newline = true)
$message = trim($this->strip_format($lang_key), "\n\r");
- if ($this->output->getVerbosity() === OutputInterface::VERBOSITY_DEBUG)
+ if ($message === 'Your requirements could not be resolved to an installable set of packages.')
{
- // Do nothing
+ $this->composer_error[] = ['COMPOSER_ERROR_CONFLICT', []];
+
+ if ($this->output->getVerbosity() < OutputInterface::VERBOSITY_DEBUG)
+ {
+ continue;
+ }
}
else if (strpos($message, ' Problem ') === 0)
{
@@ -145,11 +150,6 @@ public function writeError($messages, $newline = true)
$lang_key = 'COMPOSER_LOADING_REPOSITORIES';
$level = 1;
}
- else if ($message === 'Your requirements could not be resolved to an installable set of packages.')
- {
- $this->composer_error[] = ['COMPOSER_ERROR_CONFLICT', []];
- continue;
- }
else if (strpos($message, 'could not be fully loaded, package information was loaded from the local cache and may be out of date') !== false)
{
$end_repo = strpos($message, 'could not be fully loaded, package information was loaded from the local cache and may be out of date');
From ce12b7799f0c1d469a082819cedd67e1f82b7cfa Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Wed, 23 Dec 2015 18:12:21 +0100
Subject: [PATCH 176/431] [ticket/11150] Ignore vendor-ext in the sniffer
PHPBB3-11150
---
build/build.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/build/build.xml b/build/build.xml
index f93ff0079b3..34e1d5f930a 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -95,6 +95,7 @@
--ignore=${project.basedir}/phpBB/install/database_update.php
--ignore=${project.basedir}/phpBB/phpbb/*
--ignore=${project.basedir}/phpBB/vendor/*
+ --ignore=${project.basedir}/phpBB/vendor-ext/*
phpBB"
dir="." returnProperty="retval-php-legacy" passthru="true" />
- {{ lang('EXTENSIONS_COMPOSER_NOT_WRITABLE') }}
-
-{% endif %}
-
{{ lang('BROWSE_EXTENSIONS_DATABASE') }} • {{ lang('SETTINGS') }}
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 1bcbe9f4152..6888a00772a 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -169,14 +169,21 @@ public function main_mode($id, $mode)
$this->list_disabled_exts();
$this->list_available_exts();
+ /** @var \phpbb\composer\manager $composer_manager */
$composer_manager = $phpbb_container->get('ext.composer.manager');
+ $managed_packages = [];
+ if ($composer_manager->check_requirements())
+ {
+ $managed_packages = array_keys($composer_manager->get_managed_packages());
+ }
+
$this->request->enable_super_globals();
$this->template->assign_vars(array(
'U_VERSIONCHECK_FORCE' => $this->u_action . '&action=list&versioncheck_force=1',
'FORCE_UNSTABLE' => $this->config['extension_force_unstable'],
'U_ACTION' => $this->u_action,
- 'MANAGED_EXTENSIONS' => array_keys($composer_manager->get_managed_packages()),
+ 'MANAGED_EXTENSIONS' => $managed_packages,
'U_CATALOG_ACTION' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=catalog"),
));
$this->request->disable_super_globals();
@@ -424,6 +431,19 @@ public function catalog_mode($id, $mode)
/** @var \phpbb\extension\manager $extensions_manager */
$extensions_manager = $phpbb_container->get('ext.manager');
+ if (!$composer_manager->check_requirements())
+ {
+ $this->page_title = 'ACP_EXTENSIONS_CATALOG';
+ $this->tpl_name = 'message_body';
+
+ $this->template->assign_vars([
+ 'MESSAGE_TITLE' => $language->lang('EXTENSIONS_CATALOG_NOT_AVAILABLE'),
+ 'MESSAGE_TEXT' => $language->lang('EXTENSIONS_COMPOSER_NOT_WRITABLE'),
+ ]);
+
+ return;
+ }
+
switch ($action)
{
case 'install':
@@ -659,7 +679,6 @@ public function catalog_mode($id, $mode)
$this->tpl_name = 'acp_ext_catalog';
$this->template->assign_vars([
- 'enabled' => $manager->check_requirements(),
'extensions' => $extensions,
'managed_extensions' => array_keys($managed_packages),
'installed_extensions' => array_keys($extensions_manager->all_available()),
diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php
index 6f6add6a86e..d7c111c3b60 100644
--- a/phpBB/language/en/acp/extensions.php
+++ b/phpBB/language/en/acp/extensions.php
@@ -164,6 +164,7 @@
'EXTENSIONS_REMOVED' => 'Extensions successfully removed.',
'EXTENSIONS_UPDATED' => 'Extensions successfully updated.',
+ 'EXTENSIONS_CATALOG_NOT_AVAILABLE' => 'The extensions catalog is not available',
'EXTENSIONS_COMPOSER_NOT_WRITABLE' => 'In order to use the catalog, the following files and directories must be writable: ext/ vendor-ext/ composer-ext.json and composer-ext.lock',
'STABILITY_STABLE' => 'stable',
diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php
index e684882bfaf..205312f9e3b 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -92,7 +92,7 @@ public function __construct($root_path, filesystem $filesystem, config $config =
}
$this->packagist = (bool) $config['exts_composer_packagist'];
- $this->composer_filenam = $config['exts_composer_json_file'];
+ $this->composer_filename = $config['exts_composer_json_file'];
$this->packages_vendor_dir = $config['exts_composer_vendor_dir'];
$this->minimum_stability = $config['exts_composer_minimum_stability'];
}
@@ -451,7 +451,7 @@ public function check_requirements()
private function get_compatible_versions(array $compatible_packages, ConstraintInterface $core_constraint, $core_stability, $package_name, array $versions)
{
$core_stability_value = BasePackage::$stabilities[$core_stability];
- //VersionParser::parseStability($version['version'])
+
/** @var \Composer\Package\PackageInterface $version */
foreach ($versions as $version)
{
diff --git a/phpBB/phpbb/composer/manager.php b/phpBB/phpbb/composer/manager.php
index c9d917e5c9c..e040e3e0bea 100644
--- a/phpBB/phpbb/composer/manager.php
+++ b/phpBB/phpbb/composer/manager.php
@@ -253,6 +253,7 @@ public function get_available_packages()
if ($this->available_packages === null)
{
$this->available_packages = $this->cache->get('_composer_' . $this->package_type . '_available');
+
if (!$this->available_packages)
{
$this->available_packages = $this->installer->get_available_packages($this->package_type);
From 60bf9af27ace8d81640bd496dd4714a3dda305b8 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Sun, 3 Apr 2016 18:42:41 +0200
Subject: [PATCH 181/431] [ticket/11150] Fix illegal uage if $_SERVER when
viewing the catalog
PHPBB3-11150
---
phpBB/includes/acp/acp_extensions.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 6888a00772a..b0a18719d1c 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -172,13 +172,13 @@ public function main_mode($id, $mode)
/** @var \phpbb\composer\manager $composer_manager */
$composer_manager = $phpbb_container->get('ext.composer.manager');
+ $this->request->enable_super_globals();
$managed_packages = [];
if ($composer_manager->check_requirements())
{
$managed_packages = array_keys($composer_manager->get_managed_packages());
}
- $this->request->enable_super_globals();
$this->template->assign_vars(array(
'U_VERSIONCHECK_FORCE' => $this->u_action . '&action=list&versioncheck_force=1',
'FORCE_UNSTABLE' => $this->config['extension_force_unstable'],
From ed32ab89ad117c83a0cf6705ff654c32724cad5e Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Sun, 3 Apr 2016 18:48:58 +0200
Subject: [PATCH 182/431] [ticket/11150] Removes outdated TODO
PHPBB3-11150
---
phpBB/composer-ext.json | 0
phpBB/composer-ext.lock | 0
phpBB/phpbb/composer/manager.php | 1 -
3 files changed, 1 deletion(-)
mode change 100755 => 100644 phpBB/composer-ext.json
mode change 100755 => 100644 phpBB/composer-ext.lock
diff --git a/phpBB/composer-ext.json b/phpBB/composer-ext.json
old mode 100755
new mode 100644
diff --git a/phpBB/composer-ext.lock b/phpBB/composer-ext.lock
old mode 100755
new mode 100644
diff --git a/phpBB/phpbb/composer/manager.php b/phpBB/phpbb/composer/manager.php
index e040e3e0bea..8cc9a6ab8f7 100644
--- a/phpBB/phpbb/composer/manager.php
+++ b/phpBB/phpbb/composer/manager.php
@@ -170,7 +170,6 @@ public function remove(array $packages, IOInterface $io = null)
{
$packages = $this->normalize_version($packages);
- // TODO: if the extension is already enabled, we should disabled (with an option for purge)
$not_managed = array_diff_key($packages, $this->get_managed_packages());
if (count($not_managed) !== 0)
{
From efe37cd5a84819113a58325d1fee747c95f92b81 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Sat, 9 Apr 2016 11:29:35 +0200
Subject: [PATCH 183/431] [ticket/11150] Wording
PHPBB3-11150
---
phpBB/adm/style/acp_ext_catalog.html | 6 ++++++
phpBB/language/en/acp/extensions.php | 7 ++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/phpBB/adm/style/acp_ext_catalog.html b/phpBB/adm/style/acp_ext_catalog.html
index 482d8a8bdab..a6e9995cbbc 100644
--- a/phpBB/adm/style/acp_ext_catalog.html
+++ b/phpBB/adm/style/acp_ext_catalog.html
@@ -81,6 +81,11 @@ {{ lang( 'EXTENSIONS_CATALOG') }}
+{% if extensions is empty %}
+
+ {{ lang('NO_EXTENSION_AVAILABLE') }}
+
+{% else %}
@@ -116,6 +121,7 @@ {{ lang( 'EXTENSIONS_CATALOG') }}
{% endfor %}
+{% endif %}
{% if pagination is defined %}
diff --git a/phpBB/composer-ext.json b/phpBB/composer-ext.json
index e69de29bb2d..81944609492 100644
--- a/phpBB/composer-ext.json
+++ b/phpBB/composer-ext.json
@@ -0,0 +1,160 @@
+{
+ "require": {
+ "php": ">=5.5.9",
+ "bantu/ini-get-wrapper": "v1.0.1",
+ "google/recaptcha": "1.1.2",
+ "lusitanian/oauth": "v0.8.9",
+ "patchwork/utf8": "v1.1.31",
+ "psr/log": "1.0.0",
+ "ocramius/proxy-manager": "1.0.2",
+ "phing/phing": "2.4.14",
+ "sebastian/version": "1.0.6",
+ "sebastian/recursion-context": "1.0.2",
+ "sebastian/diff": "1.4.1",
+ "sebastian/comparator": "1.2.0",
+ "phpunit/php-text-template": "1.2.1",
+ "phpunit/php-token-stream": "1.4.8",
+ "phpunit/php-code-coverage": "2.2.4",
+ "paragonie/random_compat": "v1.4.1",
+ "symfony/polyfill-mbstring": "v1.2.0",
+ "squizlabs/php_codesniffer": "2.6.2",
+ "twig/twig": "v1.24.1",
+ "sebastian/exporter": "1.2.2",
+ "sebastian/environment": "1.3.7",
+ "phpunit/php-timer": "1.0.8",
+ "marc1706/fast-image-size": "v1.1.1",
+ "s9e/text-formatter": "0.6.2",
+ "guzzlehttp/psr7": "1.3.1",
+ "guzzlehttp/promises": "1.2.0",
+ "guzzlehttp/guzzle": "6.2.1",
+ "fabpot/goutte": "v3.1.2",
+ "facebook/webdriver": "1.1.1",
+ "symfony/process": "v3.1.3",
+ "laravel/homestead": "v3.0.2",
+ "sebastian/global-state": "1.1.1",
+ "doctrine/instantiator": "1.0.5",
+ "phpunit/phpunit-mock-objects": "2.3.8",
+ "phpunit/php-file-iterator": "1.4.1",
+ "phpdocumentor/reflection-common": "1.0",
+ "phpdocumentor/type-resolver": "0.2",
+ "phpdocumentor/reflection-docblock": "3.1.0",
+ "phpspec/prophecy": "v1.6.1",
+ "phpunit/phpunit": "4.8.27",
+ "phpunit/dbunit": "2.0.2",
+ "zendframework/zend-eventmanager": "3.0.1",
+ "zendframework/zend-code": "2.6.3",
+ "psr/http-message": "1.0",
+ "symfony/filesystem": "v3.1.3",
+ "symfony/config": "v3.1.3",
+ "symfony/http-foundation": "v3.1.3",
+ "symfony/event-dispatcher": "v3.1.3",
+ "symfony/debug": "v3.1.3",
+ "symfony/http-kernel": "v3.1.3",
+ "symfony/dependency-injection": "v3.1.3",
+ "symfony/proxy-manager-bridge": "v3.1.3",
+ "symfony/routing": "v3.1.3",
+ "symfony/twig-bridge": "v3.1.3",
+ "symfony/yaml": "v3.1.3",
+ "symfony/dom-crawler": "v3.1.3",
+ "symfony/browser-kit": "v3.1.3",
+ "symfony/css-selector": "v3.1.3",
+ "webmozart/assert": "1.0.2",
+ "symfony/finder": "v3.1.3",
+ "symfony/console": "v3.1.3",
+ "seld/phar-utils": "1.0.1",
+ "seld/jsonlint": "1.4.0",
+ "seld/cli-prompt": "1.0.2",
+ "justinrainbow/json-schema": "2.0.5",
+ "composer/spdx-licenses": "1.1.4",
+ "composer/semver": "1.4.2",
+ "composer/ca-bundle": "1.0.3",
+ "composer/composer": "1.2.0",
+ "phpbb/phpbb": "3.2.0-RC1",
+ "crizzo/aboutus": "*",
+ "phpbb/autogroups": "*"
+ },
+ "replace": {
+ "bantu/ini-get-wrapper": "v1.0.1",
+ "google/recaptcha": "1.1.2",
+ "lusitanian/oauth": "v0.8.9",
+ "patchwork/utf8": "v1.1.31",
+ "psr/log": "1.0.0",
+ "ocramius/proxy-manager": "1.0.2",
+ "phing/phing": "2.4.14",
+ "sebastian/version": "1.0.6",
+ "sebastian/recursion-context": "1.0.2",
+ "sebastian/diff": "1.4.1",
+ "sebastian/comparator": "1.2.0",
+ "phpunit/php-text-template": "1.2.1",
+ "phpunit/php-token-stream": "1.4.8",
+ "phpunit/php-code-coverage": "2.2.4",
+ "paragonie/random_compat": "v1.4.1",
+ "symfony/polyfill-mbstring": "v1.2.0",
+ "squizlabs/php_codesniffer": "2.6.2",
+ "twig/twig": "v1.24.1",
+ "sebastian/exporter": "1.2.2",
+ "sebastian/environment": "1.3.7",
+ "phpunit/php-timer": "1.0.8",
+ "marc1706/fast-image-size": "v1.1.1",
+ "s9e/text-formatter": "0.6.2",
+ "guzzlehttp/psr7": "1.3.1",
+ "guzzlehttp/promises": "1.2.0",
+ "guzzlehttp/guzzle": "6.2.1",
+ "fabpot/goutte": "v3.1.2",
+ "facebook/webdriver": "1.1.1",
+ "symfony/process": "v3.1.3",
+ "laravel/homestead": "v3.0.2",
+ "sebastian/global-state": "1.1.1",
+ "doctrine/instantiator": "1.0.5",
+ "phpunit/phpunit-mock-objects": "2.3.8",
+ "phpunit/php-file-iterator": "1.4.1",
+ "phpdocumentor/reflection-common": "1.0",
+ "phpdocumentor/type-resolver": "0.2",
+ "phpdocumentor/reflection-docblock": "3.1.0",
+ "phpspec/prophecy": "v1.6.1",
+ "phpunit/phpunit": "4.8.27",
+ "phpunit/dbunit": "2.0.2",
+ "zendframework/zend-eventmanager": "3.0.1",
+ "zendframework/zend-code": "2.6.3",
+ "psr/http-message": "1.0",
+ "symfony/filesystem": "v3.1.3",
+ "symfony/config": "v3.1.3",
+ "symfony/http-foundation": "v3.1.3",
+ "symfony/event-dispatcher": "v3.1.3",
+ "symfony/debug": "v3.1.3",
+ "symfony/http-kernel": "v3.1.3",
+ "symfony/dependency-injection": "v3.1.3",
+ "symfony/proxy-manager-bridge": "v3.1.3",
+ "symfony/routing": "v3.1.3",
+ "symfony/twig-bridge": "v3.1.3",
+ "symfony/yaml": "v3.1.3",
+ "symfony/dom-crawler": "v3.1.3",
+ "symfony/browser-kit": "v3.1.3",
+ "symfony/css-selector": "v3.1.3",
+ "webmozart/assert": "1.0.2",
+ "symfony/finder": "v3.1.3",
+ "symfony/console": "v3.1.3",
+ "seld/phar-utils": "1.0.1",
+ "seld/jsonlint": "1.4.0",
+ "seld/cli-prompt": "1.0.2",
+ "justinrainbow/json-schema": "2.0.5",
+ "composer/spdx-licenses": "1.1.4",
+ "composer/semver": "1.4.2",
+ "composer/ca-bundle": "1.0.3",
+ "composer/composer": "1.2.0",
+ "phpbb/phpbb": "3.2.0-RC1"
+ },
+ "repositories": [
+ {
+ "packagist": false
+ },
+ {
+ "type": "composer",
+ "url": "https://www.phpbb.com/customise/db/composer/"
+ }
+ ],
+ "config": {
+ "vendor-dir": "vendor-ext/"
+ },
+ "minimum-stability": "stable"
+}
diff --git a/phpBB/composer-ext.lock b/phpBB/composer-ext.lock
index e69de29bb2d..e26a1065b58 100644
--- a/phpBB/composer-ext.lock
+++ b/phpBB/composer-ext.lock
@@ -0,0 +1,257 @@
+{
+ "_readme": [
+ "This file locks the dependencies of your project to a known state",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+ "This file is @generated automatically"
+ ],
+ "hash": "bc644abe8f4679d245f64777bddac9f2",
+ "content-hash": "bf9b94509582458eddbadef8384bfdf5",
+ "packages": [
+ {
+ "name": "composer/installers",
+ "version": "v1.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/installers.git",
+ "reference": "d78064c68299743e0161004f2de3a0204e33b804"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/installers/zipball/d78064c68299743e0161004f2de3a0204e33b804",
+ "reference": "d78064c68299743e0161004f2de3a0204e33b804",
+ "shasum": ""
+ },
+ "require": {
+ "composer-plugin-api": "^1.0"
+ },
+ "replace": {
+ "roundcube/plugin-installer": "*",
+ "shama/baton": "*"
+ },
+ "require-dev": {
+ "composer/composer": "1.0.*@dev",
+ "phpunit/phpunit": "4.1.*"
+ },
+ "type": "composer-plugin",
+ "extra": {
+ "class": "Composer\\Installers\\Plugin",
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\Installers\\": "src/Composer/Installers"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Kyle Robinson Young",
+ "email": "kyle@dontkry.com",
+ "homepage": "https://github.com/shama"
+ }
+ ],
+ "description": "A multi-framework Composer library installer",
+ "homepage": "https://composer.github.io/installers/",
+ "keywords": [
+ "Craft",
+ "Dolibarr",
+ "Hurad",
+ "ImageCMS",
+ "MODX Evo",
+ "Mautic",
+ "OXID",
+ "Plentymarkets",
+ "RadPHP",
+ "SMF",
+ "Thelia",
+ "WolfCMS",
+ "agl",
+ "aimeos",
+ "annotatecms",
+ "attogram",
+ "bitrix",
+ "cakephp",
+ "chef",
+ "cockpit",
+ "codeigniter",
+ "concrete5",
+ "croogo",
+ "dokuwiki",
+ "drupal",
+ "elgg",
+ "expressionengine",
+ "fuelphp",
+ "grav",
+ "installer",
+ "joomla",
+ "kohana",
+ "laravel",
+ "lithium",
+ "magento",
+ "mako",
+ "mediawiki",
+ "modulework",
+ "moodle",
+ "phpbb",
+ "piwik",
+ "ppi",
+ "puppet",
+ "reindex",
+ "roundcube",
+ "shopware",
+ "silverstripe",
+ "symfony",
+ "typo3",
+ "wordpress",
+ "yawik",
+ "zend",
+ "zikula"
+ ],
+ "time": "2016-08-13 20:53:52"
+ },
+ {
+ "name": "crizzo/aboutus",
+ "version": "2.0.4",
+ "dist": {
+ "type": "zip",
+ "url": "https://www.phpbb.com/customise/db/download/121131/composer",
+ "reference": null,
+ "shasum": null
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "phpbb-extension",
+ "extra": {
+ "display-name": "About us",
+ "soft-require": {
+ "phpbb/phpbb": ">=3.1.2"
+ },
+ "version-check": {
+ "host": "www.phpbb.com",
+ "directory": "/customise/db/extension/about_us",
+ "filename": "version_check"
+ }
+ },
+ "license": [
+ "GPL-2.0"
+ ],
+ "authors": [
+ {
+ "name": "Christian Schnegelberger",
+ "username": "Crizzo",
+ "email": "kontakt@crizzo.de",
+ "homepage": "http://www.crizzo.de",
+ "role": "Developer/Founder"
+ }
+ ],
+ "description": "About us is an extension which adds to phpBB 3.1 a about us or legal notice-page, where you can add your contact details and more.",
+ "homepage": "https://www.phpbb.com/customise/db/extension/about_us/",
+ "time": "2015-10-23 00:00:00"
+ },
+ {
+ "name": "phpbb/autogroups",
+ "version": "1.0.1",
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpbb-extensions/autogroups/zipball/38ffd4dfaa839310f42be43b32075c8237f239d0",
+ "reference": "38ffd4dfaa839310f42be43b32075c8237f239d0",
+ "shasum": ""
+ },
+ "require": {
+ "composer/installers": "~1.0",
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phing/phing": "2.4.*",
+ "phpbb/epv": "dev-master"
+ },
+ "type": "phpbb-extension",
+ "extra": {
+ "display-name": "Auto Groups",
+ "soft-require": {
+ "phpbb/phpbb": ">=3.1.0,<3.2.*@dev"
+ },
+ "version-check": {
+ "host": "www.phpbb.com",
+ "directory": "/customise/db/extension/auto_groups",
+ "filename": "version_check"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL-2.0"
+ ],
+ "authors": [
+ {
+ "name": "Michael Cullum",
+ "email": "michael@phpbb.com",
+ "homepage": "http://michaelcullum.com",
+ "role": "Extensions Team Consultant"
+ },
+ {
+ "name": "Marc Alexander",
+ "email": "admin@m-a-styles.de",
+ "homepage": "http://www.m-a-styles.de",
+ "role": "Extensions Team Consultant"
+ },
+ {
+ "name": "Matt Friedman",
+ "homepage": "http://mattfriedman.me",
+ "role": "Extensions Development Team Lead"
+ },
+ {
+ "name": "Nathan Guse",
+ "email": "nathaniel.guse@gmail.com",
+ "role": "Former Extensions Development Team Lead"
+ },
+ {
+ "name": "Clemens Husung",
+ "email": "wolfsblvt@pinkes-forum.de",
+ "role": "Extensions Development Team"
+ },
+ {
+ "name": "Lukasz Kaczynski",
+ "role": "Former Extensions Development Team Member"
+ },
+ {
+ "name": "John Peskens",
+ "email": "info@forumhulp.com",
+ "homepage": "http://forumhulp.com",
+ "role": "Former Extensions Development Team Member"
+ },
+ {
+ "name": "Ruslan Uzdenov",
+ "homepage": "http://www.phpbbguru.net",
+ "role": "Extensions Development Team"
+ }
+ ],
+ "description": "An extension that can automate the process of adding and removing users from groups upon reaching specified milestones related to their post count, age, membership, and warnings count.",
+ "homepage": "https://www.phpbb.com",
+ "keywords": [
+ "auto",
+ "extension",
+ "groups",
+ "phpbb"
+ ],
+ "time": "2015-09-05 17:30:29"
+ }
+ ],
+ "packages-dev": [],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": {
+ "phpbb/phpbb": 5
+ },
+ "prefer-stable": true,
+ "prefer-lowest": false,
+ "platform": {
+ "php": ">=5.5.9"
+ },
+ "platform-dev": []
+}
diff --git a/phpBB/composer.json b/phpBB/composer.json
index 324ef32a1fa..6f8e930c8bb 100644
--- a/phpBB/composer.json
+++ b/phpBB/composer.json
@@ -27,6 +27,7 @@
"require": {
"php": ">=5.5.9",
"bantu/ini-get-wrapper": "1.0.*",
+ "composer/composer": "^1.0",
"google/recaptcha": "~1.1",
"guzzlehttp/guzzle": "~6.2",
"lusitanian/oauth": "^0.8.1",
@@ -47,8 +48,7 @@
"symfony/routing": "~3.1",
"symfony/twig-bridge": "~3.1",
"symfony/yaml": "~3.1",
- "twig/twig": "^1.0,<1.25",
- "composer/composer": "^1.0"
+ "twig/twig": "^1.0,<1.25"
},
"require-dev": {
"fabpot/goutte": "~3.1",
diff --git a/phpBB/composer.lock b/phpBB/composer.lock
index 6ad23abf13e..81903906a7f 100644
--- a/phpBB/composer.lock
+++ b/phpBB/composer.lock
@@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "80752e19604f3bd6ac0af14d488a748b",
- "content-hash": "60c4fa2116744111294d5c3a5c21afdd",
+ "hash": "fb27e08d4d657b78f87a3327a41d9e20",
+ "content-hash": "274c9cfc16d9a9cd40daffe7383d568a",
"packages": [
{
"name": "bantu/ini-get-wrapper",
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index b0a18719d1c..eda3bace351 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -624,7 +624,14 @@ public function catalog_mode($id, $mode)
$enable_on_install = $this->request->variable('enable_on_install', false);
$purge_on_remove = $this->request->variable('purge_on_remove', false);
$minimum_stability = $this->request->variable('minimum_stability', 'stable');
- $repositories = array_unique(explode("\n", $this->request->variable('repositories', '')));
+ $repositories = array_unique(
+ array_filter(
+ array_map(
+ 'trim',
+ explode("\n", $this->request->variable('repositories', ''))
+ )
+ )
+ );
$previous_minimum_stability = $this->config['exts_composer_minimum_stability'];
$previous_repositories = $this->config['exts_composer_repositories'];
diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php
index 205312f9e3b..b3933954f93 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -27,6 +27,7 @@
use phpbb\config\config;
use phpbb\exception\runtime_exception;
use phpbb\filesystem\filesystem;
+use Seld\JsonLint\ParsingException;
/**
* Class to install packages through composer while freezing core dependencies.
@@ -513,7 +514,19 @@ protected function generate_ext_json_file(array $packages)
$this->ext_json_file_backup = null;
$json_file = new JsonFile($this->get_composer_ext_json_filename());
- $ext_json_file_backup = $json_file->read();
+
+ try
+ {
+ $ext_json_file_backup = $json_file->read();
+ }
+ catch (ParsingException $e)
+ {
+ $ext_json_file_backup = '{}';
+
+ $lockFile = new JsonFile(substr($this->get_composer_ext_json_filename(), 0, -5) . '.lock');
+ $lockFile->write([]);
+ }
+
$json_file->write($ext_json_data);
$this->ext_json_file_backup = $ext_json_file_backup;
}
diff --git a/phpBB/phpbb/composer/io/translate_composer_trait.php b/phpBB/phpbb/composer/io/translate_composer_trait.php
index 9a0f63ceb57..444cf38e6b8 100644
--- a/phpBB/phpbb/composer/io/translate_composer_trait.php
+++ b/phpBB/phpbb/composer/io/translate_composer_trait.php
@@ -33,7 +33,7 @@ trait translate_composer_trait
/**
* {@inheritdoc}
*/
- public function write($messages, $newline = true)
+ public function write($messages, $newline = true, $verbosity = self::NORMAL)
{
$messages = (array) $messages;
$translated_messages = [];
@@ -96,7 +96,7 @@ public function write($messages, $newline = true)
/**
* {@inheritdoc}
*/
- public function writeError($messages, $newline = true)
+ public function writeError($messages, $newline = true, $verbosity = self::NORMAL)
{
$messages = (array) $messages;
$translated_messages = [];
diff --git a/phpBB/phpbb/composer/manager.php b/phpBB/phpbb/composer/manager.php
index 8cc9a6ab8f7..db2f7135095 100644
--- a/phpBB/phpbb/composer/manager.php
+++ b/phpBB/phpbb/composer/manager.php
@@ -253,7 +253,7 @@ public function get_available_packages()
{
$this->available_packages = $this->cache->get('_composer_' . $this->package_type . '_available');
- if (!$this->available_packages)
+ if (true || !$this->available_packages)
{
$this->available_packages = $this->installer->get_available_packages($this->package_type);
$this->cache->put('_composer_' . $this->package_type . '_available', $this->available_packages, 24*60*60);
From d59b26dcecd1c2d7eff45bda3d19a226f0f036f4 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Thu, 6 Apr 2017 20:14:46 +0200
Subject: [PATCH 186/431] [ticket/11150] Add comments + ignore invaid
repositories URLs
PHPBB3-11150
---
phpBB/adm/style/acp_ext_catalog.html | 2 +-
phpBB/includes/acp/acp_extensions.php | 6 ++++++
phpBB/phpbb/composer/installer.php | 11 +++++++----
phpBB/phpbb/composer/manager.php | 12 ++++++++++++
4 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/phpBB/adm/style/acp_ext_catalog.html b/phpBB/adm/style/acp_ext_catalog.html
index 84839adf9cd..787b620e624 100644
--- a/phpBB/adm/style/acp_ext_catalog.html
+++ b/phpBB/adm/style/acp_ext_catalog.html
@@ -7,7 +7,7 @@ {{ lang( 'EXTENSIONS_CATALOG') }}
{{ 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 eda3bace351..9225ae9f275 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -416,6 +416,12 @@ public function main_mode($id, $mode)
$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 b3933954f93..f6f2f1c83a2 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -599,10 +599,13 @@ protected function get_composer_repositories()
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 db2f7135095..b75bcad3d75 100644
--- a/phpBB/phpbb/composer/manager.php
+++ b/phpBB/phpbb/composer/manager.php
@@ -291,6 +291,18 @@ public function 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)
{
$normalized_packages = [];
From ab162b2fa6a453037f5deb29f107250690826a44 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Fri, 7 Apr 2017 20:00:06 +0200
Subject: [PATCH 187/431] [ticket/11150] Do not generate actions links in
templates
PHPBB3-11150
---
phpBB/adm/style/acp_ext_list.html | 10 +--
phpBB/includes/acp/acp_extensions.php | 92 +++++++++++++++++++++++++--
phpBB/language/en/acp/extensions.php | 3 +-
3 files changed, 91 insertions(+), 14 deletions(-)
diff --git a/phpBB/adm/style/acp_ext_list.html b/phpBB/adm/style/acp_ext_list.html
index eb2e75cff55..797cdc09bd8 100644
--- a/phpBB/adm/style/acp_ext_list.html
+++ b/phpBB/adm/style/acp_ext_list.html
@@ -59,7 +59,7 @@ {L_EXTENSIONS_ADMIN}
{L_DETAILS}
- title="{enabled.actions.L_ACTION_EXPLAIN}">{enabled.actions.L_ACTION}
+ title="{enabled.actions.L_ACTION_EXPLAIN}" style="color: {enabled.actions.COLOR};">{enabled.actions.L_ACTION}
|
@@ -86,15 +86,9 @@ {L_EXTENSIONS_ADMIN}
- title="{disabled.actions.L_ACTION_EXPLAIN}">{disabled.actions.L_ACTION}
+ title="{disabled.actions.L_ACTION_EXPLAIN}" style="color: {disabled.actions.COLOR};">{disabled.actions.L_ACTION}
|
-
-
- |
- {L_UPDATE}
- | {L_REMOVE}
-
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 9225ae9f275..9a8357a7339 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -41,7 +41,13 @@ class acp_extensions
private $phpbb_dispatcher;
private $ext_manager;
+<<<<<<< 6c9f0a1c6fa9cfe406242bbf5f3204221003a00a
function main()
+=======
+ private $u_catalog_action;
+
+ function main($id, $mode)
+>>>>>>> [ticket/11150] Do not generate actions links in templates
{
// Start the page
global $config, $user, $template, $request, $phpbb_extension_manager, $db, $phpbb_root_path, $phpbb_log, $phpbb_dispatcher;
@@ -132,6 +138,8 @@ public function main_mode($id, $mode)
}
}
+ $this->u_catalog_action = append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=catalog");
+
// What are we doing?
switch ($action)
{
@@ -165,10 +173,13 @@ public function main_mode($id, $mode)
trigger_error($this->user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
}
+<<<<<<< 6c9f0a1c6fa9cfe406242bbf5f3204221003a00a
$this->list_enabled_exts();
$this->list_disabled_exts();
$this->list_available_exts();
+=======
+>>>>>>> [ticket/11150] Do not generate actions links in templates
/** @var \phpbb\composer\manager $composer_manager */
$composer_manager = $phpbb_container->get('ext.composer.manager');
@@ -176,15 +187,20 @@ public function main_mode($id, $mode)
$managed_packages = [];
if ($composer_manager->check_requirements())
{
- $managed_packages = array_keys($composer_manager->get_managed_packages());
+ $managed_packages = $composer_manager->get_managed_packages();
}
+ $this->request->disable_super_globals();
+
+ $this->list_enabled_exts($phpbb_extension_manager, $managed_packages);
+ $this->list_disabled_exts($phpbb_extension_manager, $managed_packages);
+ $this->list_available_exts($phpbb_extension_manager, $managed_packages);
$this->template->assign_vars(array(
'U_VERSIONCHECK_FORCE' => $this->u_action . '&action=list&versioncheck_force=1',
'FORCE_UNSTABLE' => $this->config['extension_force_unstable'],
'U_ACTION' => $this->u_action,
'MANAGED_EXTENSIONS' => $managed_packages,
- 'U_CATALOG_ACTION' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=catalog"),
+ 'U_CATALOG_ACTION' => $this->u_catalog_action,
));
$this->request->disable_super_globals();
@@ -753,11 +769,21 @@ private function display_composer_exception(\phpbb\language\language $language,
}
/**
+<<<<<<< 6c9f0a1c6fa9cfe406242bbf5f3204221003a00a
* Lists all the enabled extensions and dumps to the template
*
* @return null
*/
public function list_enabled_exts()
+=======
+ * Lists all the enabled extensions and dumps to the template
+ *
+ * @param \phpbb\extension\manager $phpbb_extension_manager An instance of the extension manager
+ * @param array $managed_packages List of managed packages
+ * @return null
+ */
+ public function list_enabled_exts(\phpbb\extension\manager $phpbb_extension_manager, array $managed_packages)
+>>>>>>> [ticket/11150] Do not generate actions links in templates
{
$enabled_extension_meta_data = array();
@@ -821,15 +847,37 @@ public function list_enabled_exts()
$this->output_actions('enabled', array(
'DISABLE' => $this->u_action . '&action=disable_pre&ext_name=' . urlencode($name),
));
+
+ if (isset($managed_packages[$block_vars['META_NAME']]))
+ {
+ $this->output_actions('disabled', [
+ 'UPDATE' => $this->u_catalog_action . '&action=update&extension=' . urlencode($block_vars['META_NAME']),
+ 'REMOVE' => [
+ 'url' => $this->u_catalog_action . '&action=remove&extension=' . urlencode($block_vars['META_NAME']),
+ 'color' => '#BC2A4D;',
+ ]
+ ]);
+ }
}
}
/**
+<<<<<<< 6c9f0a1c6fa9cfe406242bbf5f3204221003a00a
* Lists all the disabled extensions and dumps to the template
*
* @return null
*/
public function list_disabled_exts()
+=======
+ * Lists all the disabled extensions and dumps to the template
+ *
+ * @param \phpbb\extension\manager $phpbb_extension_manager An instance of the extension manager
+ * @param array $managed_packages List of managed packages
+ *
+ * @return null
+ */
+ public function list_disabled_exts(\phpbb\extension\manager $phpbb_extension_manager, array $managed_packages)
+>>>>>>> [ticket/11150] Do not generate actions links in templates
{
$disabled_extension_meta_data = array();
@@ -891,15 +939,36 @@ public function list_disabled_exts()
'ENABLE' => $this->u_action . '&action=enable_pre&ext_name=' . urlencode($name),
'DELETE_DATA' => $this->u_action . '&action=delete_data_pre&ext_name=' . urlencode($name),
));
+
+ if (isset($managed_packages[$block_vars['META_NAME']]))
+ {
+ $this->output_actions('disabled', [
+ 'UPDATE' => $this->u_catalog_action . '&action=update&extension=' . urlencode($block_vars['META_NAME']),
+ 'REMOVE' => [
+ 'url' => $this->u_catalog_action . '&action=remove&extension=' . urlencode($block_vars['META_NAME']),
+ 'color' => '#BC2A4D;',
+ ]
+ ]);
+ }
}
}
/**
* Lists all the available extensions and dumps to the template
+<<<<<<< 6c9f0a1c6fa9cfe406242bbf5f3204221003a00a
*
* @return null
*/
public function list_available_exts()
+=======
+ *
+ * @param \phpbb\extension\manager $phpbb_extension_manager An instance of the extension manager
+ * @param array $managed_packages List of managed packages
+ *
+ * @return null
+ */
+ public function list_available_exts(\phpbb\extension\manager $phpbb_extension_manager, array $managed_packages)
+>>>>>>> [ticket/11150] Do not generate actions links in templates
{
$uninstalled = array_diff_key($this->ext_manager->all_available(), $this->ext_manager->all_configured());
@@ -969,13 +1038,26 @@ public function list_available_exts()
*/
private function output_actions($block, $actions)
{
- foreach ($actions as $lang => $url)
+ foreach ($actions as $lang => $options)
{
- $this->template->assign_block_vars($block . '.actions', array(
+ $url = $options;
+ if (is_array($options))
+ {
+ $url = $options['url'];
+ }
+
+ $vars = array(
'L_ACTION' => $this->user->lang('EXTENSION_' . $lang),
'L_ACTION_EXPLAIN' => (isset($this->user->lang['EXTENSION_' . $lang . '_EXPLAIN'])) ? $this->user->lang('EXTENSION_' . $lang . '_EXPLAIN') : '',
'U_ACTION' => $url,
- ));
+ );
+
+ if (isset($options['color']))
+ {
+ $vars['COLOR'] = $options['color'];
+ }
+
+ $this->template->assign_block_vars($block . '.actions', $vars);
}
}
diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php
index cb1c9c35e43..66bb5ca8ac6 100644
--- a/phpBB/language/en/acp/extensions.php
+++ b/phpBB/language/en/acp/extensions.php
@@ -59,7 +59,6 @@
'EXTENSION_NOT_AVAILABLE' => 'The selected extension is not available for this board, please verify your phpBB and PHP versions are allowed (see the details page).',
'EXTENSION_DIR_INVALID' => 'The selected extension has an invalid directory structure and cannot be enabled.',
'EXTENSION_NOT_ENABLEABLE' => 'The selected extension cannot be enabled, please verify the extension’s requirements.',
- 'EXTENSION_NOT_INSTALLED' => 'The extension %s is not available. Please check that you have installed it correctly.',
'DETAILS' => 'Details',
@@ -69,6 +68,8 @@
'EXTENSION_DELETE_DATA' => 'Delete data',
'EXTENSION_DISABLE' => 'Disable',
'EXTENSION_ENABLE' => 'Enable',
+ 'EXTENSION_UPDATE' => 'Update',
+ 'EXTENSION_REMOVE' => 'Remove',
'EXTENSION_DELETE_DATA_EXPLAIN' => 'Deleting an extension’s data removes all of its data and settings. The extension files are retained so it can be enabled again.',
'EXTENSION_DISABLE_EXPLAIN' => 'Disabling an extension retains its files, data and settings but removes any functionality added by the extension.',
From a49663a10faa8d9f0c8ccfb3a6044797e93cdd78 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Mon, 17 Apr 2017 15:53:30 +0200
Subject: [PATCH 188/431] [ticket/11150] Silly CSS changes
PHPBB3-11150
---
phpBB/adm/style/admin.css | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index aab20b36d5e..a6f572090bd 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -1333,13 +1333,15 @@ p.quick {
text-align: left;
}
-fieldset.quick-left, p.quick-left {
- margin: 15px 0 5px 0;
- padding: 0 0px 0;
+fieldset.quick-left,
+p.quick-left {
+ margin: 15px 0 5px;
float: left;
+ padding: 0 0 0;
}
-.rtl fieldset.quick-left, .rtl p.quick-left {
+.rtl fieldset.quick-left,
+.rtl p.quick-left {
float: right;
}
@@ -2972,8 +2974,8 @@ fieldset.permissions .permissions-switch {
.console-output {
background-color: #2a2a2a;
- color: #f1f1f1;
font-family: monospace;
- overflow-x:scroll;
- line-height: 1.5em;
+ color: #f1f1f1;
+ line-height: 1.5rem;
+ overflow-x: scroll;
}
From 9314e533c832d0e7eb3bfab6cc6c8468989ef7fa Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Mon, 17 Apr 2017 18:43:39 +0200
Subject: [PATCH 189/431] [ticket/11150] Fix rebase conflicts
PHPBB3-11150
---
phpBB/includes/acp/acp_extensions.php | 52 ++++++---------------------
1 file changed, 10 insertions(+), 42 deletions(-)
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 9a8357a7339..c42cf38804d 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -25,13 +25,13 @@
class acp_extensions
{
var $u_action;
- var $tpl_name;
- var $page_title;
private $db;
/** @var phpbb\config\config */
private $config;
+
+ /** @var \phpbb\template\twig\twig */
private $template;
private $user;
private $log;
@@ -39,18 +39,15 @@ class acp_extensions
/** @var \phpbb\request\request */
private $request;
private $phpbb_dispatcher;
- private $ext_manager;
-<<<<<<< 6c9f0a1c6fa9cfe406242bbf5f3204221003a00a
- function main()
-=======
+ /** @var \phpbb\extension\manager */
+ private $ext_manager;
private $u_catalog_action;
function main($id, $mode)
->>>>>>> [ticket/11150] Do not generate actions links in templates
{
// Start the page
- global $config, $user, $template, $request, $phpbb_extension_manager, $db, $phpbb_root_path, $phpbb_log, $phpbb_dispatcher;
+ global $config, $user, $template, $request, $phpbb_extension_manager, $db, $phpbb_log, $phpbb_dispatcher;
$this->db = $db;
@@ -77,7 +74,7 @@ function main($id, $mode)
public function main_mode($id, $mode)
{
- global $phpbb_extension_manager, $phpbb_root_path, $phpbb_container, $phpbb_admin_path, $phpEx;
+ global $phpbb_extension_manager, $phpbb_container, $phpbb_admin_path, $phpEx;
$this->page_title = 'ACP_EXTENSIONS';
@@ -173,13 +170,6 @@ public function main_mode($id, $mode)
trigger_error($this->user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
}
-<<<<<<< 6c9f0a1c6fa9cfe406242bbf5f3204221003a00a
- $this->list_enabled_exts();
- $this->list_disabled_exts();
- $this->list_available_exts();
-
-=======
->>>>>>> [ticket/11150] Do not generate actions links in templates
/** @var \phpbb\composer\manager $composer_manager */
$composer_manager = $phpbb_container->get('ext.composer.manager');
@@ -769,21 +759,14 @@ private function display_composer_exception(\phpbb\language\language $language,
}
/**
-<<<<<<< 6c9f0a1c6fa9cfe406242bbf5f3204221003a00a
- * Lists all the enabled extensions and dumps to the template
- *
- * @return null
- */
- public function list_enabled_exts()
-=======
* Lists all the enabled extensions and dumps to the template
*
* @param \phpbb\extension\manager $phpbb_extension_manager An instance of the extension manager
* @param array $managed_packages List of managed packages
+ *
* @return null
*/
public function list_enabled_exts(\phpbb\extension\manager $phpbb_extension_manager, array $managed_packages)
->>>>>>> [ticket/11150] Do not generate actions links in templates
{
$enabled_extension_meta_data = array();
@@ -862,13 +845,6 @@ public function list_enabled_exts(\phpbb\extension\manager $phpbb_extension_mana
}
/**
-<<<<<<< 6c9f0a1c6fa9cfe406242bbf5f3204221003a00a
- * Lists all the disabled extensions and dumps to the template
- *
- * @return null
- */
- public function list_disabled_exts()
-=======
* Lists all the disabled extensions and dumps to the template
*
* @param \phpbb\extension\manager $phpbb_extension_manager An instance of the extension manager
@@ -877,7 +853,6 @@ public function list_disabled_exts()
* @return null
*/
public function list_disabled_exts(\phpbb\extension\manager $phpbb_extension_manager, array $managed_packages)
->>>>>>> [ticket/11150] Do not generate actions links in templates
{
$disabled_extension_meta_data = array();
@@ -954,21 +929,14 @@ public function list_disabled_exts(\phpbb\extension\manager $phpbb_extension_man
}
/**
- * Lists all the available extensions and dumps to the template
-<<<<<<< 6c9f0a1c6fa9cfe406242bbf5f3204221003a00a
- *
- * @return null
- */
- public function list_available_exts()
-=======
+ * Lists all the available extensions and dumps to the template
*
* @param \phpbb\extension\manager $phpbb_extension_manager An instance of the extension manager
* @param array $managed_packages List of managed packages
*
- * @return null
- */
+ * @return null
+ */
public function list_available_exts(\phpbb\extension\manager $phpbb_extension_manager, array $managed_packages)
->>>>>>> [ticket/11150] Do not generate actions links in templates
{
$uninstalled = array_diff_key($this->ext_manager->all_available(), $this->ext_manager->all_configured());
From 31953496ee1a42cf2e466ca84838c31f83a28347 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Mon, 17 Apr 2017 23:17:03 +0200
Subject: [PATCH 190/431] [ticket/11150] More CSS fixes
PHPBB3-11150
---
phpBB/adm/style/admin.css | 7 +++----
phpBB/includes/acp/acp_extensions.php | 1 -
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index a6f572090bd..6e736ee6d28 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -1335,9 +1335,9 @@ p.quick {
fieldset.quick-left,
p.quick-left {
- margin: 15px 0 5px;
float: left;
- padding: 0 0 0;
+ margin: 15px 0 5px;
+ padding: 0;
}
.rtl fieldset.quick-left,
@@ -2973,9 +2973,8 @@ fieldset.permissions .permissions-switch {
/* stylelint-enable declaration-property-unit-whitelist */
.console-output {
- background-color: #2a2a2a;
font-family: monospace;
+ background-color: #2a2a2a;
color: #f1f1f1;
- line-height: 1.5rem;
overflow-x: scroll;
}
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index c42cf38804d..949683e6b46 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -49,7 +49,6 @@ function main($id, $mode)
// Start the page
global $config, $user, $template, $request, $phpbb_extension_manager, $db, $phpbb_log, $phpbb_dispatcher;
-
$this->db = $db;
$this->config = $config;
$this->template = $template;
From 69571f9cef9a21876cf5092f44973ccfe6b533b4 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Fri, 21 Apr 2017 21:43:03 +0200
Subject: [PATCH 191/431] [ticket/11150] Fix comments
PHPBB3-11150
---
.gitignore | 2 +
phpBB/bin/phpbbcli.php | 2 +-
phpBB/common.php | 2 +-
phpBB/composer-ext.json | 160 -----------
phpBB/composer-ext.lock | 257 ------------------
phpBB/download/file.php | 2 +-
phpBB/includes/acp/acp_extensions.php | 2 +-
phpBB/language/en/acp/extensions.php | 16 +-
.../composer/io/html_output_formatter.php | 3 -
phpBB/phpbb/composer/manager.php | 2 +-
.../{v320 => v330}/extensions_composer.php | 2 +-
phpBB/phpbb/di/container_builder.php | 2 +-
12 files changed, 17 insertions(+), 435 deletions(-)
rename phpBB/phpbb/db/migration/data/{v320 => v330}/extensions_composer.php (96%)
diff --git a/.gitignore b/.gitignore
index 13cfa16ebf0..10a4e85c2ed 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,8 @@ node_modules
/phpBB/vendor
/phpBB/vendor-ext/*
!/phpBB/vendor-ext/.git-keep
+/phpBB/composer-ext.json
+/phpBB/composer-ext.lock
/tests/phpbb_unit_tests.sqlite*
/tests/test_config*.php
/tests/tmp/*
diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php
index 1b3fac51e01..d007ab39143 100755
--- a/phpBB/bin/phpbbcli.php
+++ b/phpBB/bin/phpbbcli.php
@@ -71,7 +71,7 @@
register_compatibility_globals();
-if (is_file($phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php'))
+if (@is_file($phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php'))
{
require_once($phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php');
}
diff --git a/phpBB/common.php b/phpBB/common.php
index 30293cae519..ea386978fb2 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -141,7 +141,7 @@
register_compatibility_globals();
-if (is_file($phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php'))
+if (@is_file($phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php'))
{
require_once($phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php');
}
diff --git a/phpBB/composer-ext.json b/phpBB/composer-ext.json
index 81944609492..e69de29bb2d 100644
--- a/phpBB/composer-ext.json
+++ b/phpBB/composer-ext.json
@@ -1,160 +0,0 @@
-{
- "require": {
- "php": ">=5.5.9",
- "bantu/ini-get-wrapper": "v1.0.1",
- "google/recaptcha": "1.1.2",
- "lusitanian/oauth": "v0.8.9",
- "patchwork/utf8": "v1.1.31",
- "psr/log": "1.0.0",
- "ocramius/proxy-manager": "1.0.2",
- "phing/phing": "2.4.14",
- "sebastian/version": "1.0.6",
- "sebastian/recursion-context": "1.0.2",
- "sebastian/diff": "1.4.1",
- "sebastian/comparator": "1.2.0",
- "phpunit/php-text-template": "1.2.1",
- "phpunit/php-token-stream": "1.4.8",
- "phpunit/php-code-coverage": "2.2.4",
- "paragonie/random_compat": "v1.4.1",
- "symfony/polyfill-mbstring": "v1.2.0",
- "squizlabs/php_codesniffer": "2.6.2",
- "twig/twig": "v1.24.1",
- "sebastian/exporter": "1.2.2",
- "sebastian/environment": "1.3.7",
- "phpunit/php-timer": "1.0.8",
- "marc1706/fast-image-size": "v1.1.1",
- "s9e/text-formatter": "0.6.2",
- "guzzlehttp/psr7": "1.3.1",
- "guzzlehttp/promises": "1.2.0",
- "guzzlehttp/guzzle": "6.2.1",
- "fabpot/goutte": "v3.1.2",
- "facebook/webdriver": "1.1.1",
- "symfony/process": "v3.1.3",
- "laravel/homestead": "v3.0.2",
- "sebastian/global-state": "1.1.1",
- "doctrine/instantiator": "1.0.5",
- "phpunit/phpunit-mock-objects": "2.3.8",
- "phpunit/php-file-iterator": "1.4.1",
- "phpdocumentor/reflection-common": "1.0",
- "phpdocumentor/type-resolver": "0.2",
- "phpdocumentor/reflection-docblock": "3.1.0",
- "phpspec/prophecy": "v1.6.1",
- "phpunit/phpunit": "4.8.27",
- "phpunit/dbunit": "2.0.2",
- "zendframework/zend-eventmanager": "3.0.1",
- "zendframework/zend-code": "2.6.3",
- "psr/http-message": "1.0",
- "symfony/filesystem": "v3.1.3",
- "symfony/config": "v3.1.3",
- "symfony/http-foundation": "v3.1.3",
- "symfony/event-dispatcher": "v3.1.3",
- "symfony/debug": "v3.1.3",
- "symfony/http-kernel": "v3.1.3",
- "symfony/dependency-injection": "v3.1.3",
- "symfony/proxy-manager-bridge": "v3.1.3",
- "symfony/routing": "v3.1.3",
- "symfony/twig-bridge": "v3.1.3",
- "symfony/yaml": "v3.1.3",
- "symfony/dom-crawler": "v3.1.3",
- "symfony/browser-kit": "v3.1.3",
- "symfony/css-selector": "v3.1.3",
- "webmozart/assert": "1.0.2",
- "symfony/finder": "v3.1.3",
- "symfony/console": "v3.1.3",
- "seld/phar-utils": "1.0.1",
- "seld/jsonlint": "1.4.0",
- "seld/cli-prompt": "1.0.2",
- "justinrainbow/json-schema": "2.0.5",
- "composer/spdx-licenses": "1.1.4",
- "composer/semver": "1.4.2",
- "composer/ca-bundle": "1.0.3",
- "composer/composer": "1.2.0",
- "phpbb/phpbb": "3.2.0-RC1",
- "crizzo/aboutus": "*",
- "phpbb/autogroups": "*"
- },
- "replace": {
- "bantu/ini-get-wrapper": "v1.0.1",
- "google/recaptcha": "1.1.2",
- "lusitanian/oauth": "v0.8.9",
- "patchwork/utf8": "v1.1.31",
- "psr/log": "1.0.0",
- "ocramius/proxy-manager": "1.0.2",
- "phing/phing": "2.4.14",
- "sebastian/version": "1.0.6",
- "sebastian/recursion-context": "1.0.2",
- "sebastian/diff": "1.4.1",
- "sebastian/comparator": "1.2.0",
- "phpunit/php-text-template": "1.2.1",
- "phpunit/php-token-stream": "1.4.8",
- "phpunit/php-code-coverage": "2.2.4",
- "paragonie/random_compat": "v1.4.1",
- "symfony/polyfill-mbstring": "v1.2.0",
- "squizlabs/php_codesniffer": "2.6.2",
- "twig/twig": "v1.24.1",
- "sebastian/exporter": "1.2.2",
- "sebastian/environment": "1.3.7",
- "phpunit/php-timer": "1.0.8",
- "marc1706/fast-image-size": "v1.1.1",
- "s9e/text-formatter": "0.6.2",
- "guzzlehttp/psr7": "1.3.1",
- "guzzlehttp/promises": "1.2.0",
- "guzzlehttp/guzzle": "6.2.1",
- "fabpot/goutte": "v3.1.2",
- "facebook/webdriver": "1.1.1",
- "symfony/process": "v3.1.3",
- "laravel/homestead": "v3.0.2",
- "sebastian/global-state": "1.1.1",
- "doctrine/instantiator": "1.0.5",
- "phpunit/phpunit-mock-objects": "2.3.8",
- "phpunit/php-file-iterator": "1.4.1",
- "phpdocumentor/reflection-common": "1.0",
- "phpdocumentor/type-resolver": "0.2",
- "phpdocumentor/reflection-docblock": "3.1.0",
- "phpspec/prophecy": "v1.6.1",
- "phpunit/phpunit": "4.8.27",
- "phpunit/dbunit": "2.0.2",
- "zendframework/zend-eventmanager": "3.0.1",
- "zendframework/zend-code": "2.6.3",
- "psr/http-message": "1.0",
- "symfony/filesystem": "v3.1.3",
- "symfony/config": "v3.1.3",
- "symfony/http-foundation": "v3.1.3",
- "symfony/event-dispatcher": "v3.1.3",
- "symfony/debug": "v3.1.3",
- "symfony/http-kernel": "v3.1.3",
- "symfony/dependency-injection": "v3.1.3",
- "symfony/proxy-manager-bridge": "v3.1.3",
- "symfony/routing": "v3.1.3",
- "symfony/twig-bridge": "v3.1.3",
- "symfony/yaml": "v3.1.3",
- "symfony/dom-crawler": "v3.1.3",
- "symfony/browser-kit": "v3.1.3",
- "symfony/css-selector": "v3.1.3",
- "webmozart/assert": "1.0.2",
- "symfony/finder": "v3.1.3",
- "symfony/console": "v3.1.3",
- "seld/phar-utils": "1.0.1",
- "seld/jsonlint": "1.4.0",
- "seld/cli-prompt": "1.0.2",
- "justinrainbow/json-schema": "2.0.5",
- "composer/spdx-licenses": "1.1.4",
- "composer/semver": "1.4.2",
- "composer/ca-bundle": "1.0.3",
- "composer/composer": "1.2.0",
- "phpbb/phpbb": "3.2.0-RC1"
- },
- "repositories": [
- {
- "packagist": false
- },
- {
- "type": "composer",
- "url": "https://www.phpbb.com/customise/db/composer/"
- }
- ],
- "config": {
- "vendor-dir": "vendor-ext/"
- },
- "minimum-stability": "stable"
-}
diff --git a/phpBB/composer-ext.lock b/phpBB/composer-ext.lock
index e26a1065b58..e69de29bb2d 100644
--- a/phpBB/composer-ext.lock
+++ b/phpBB/composer-ext.lock
@@ -1,257 +0,0 @@
-{
- "_readme": [
- "This file locks the dependencies of your project to a known state",
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
- "This file is @generated automatically"
- ],
- "hash": "bc644abe8f4679d245f64777bddac9f2",
- "content-hash": "bf9b94509582458eddbadef8384bfdf5",
- "packages": [
- {
- "name": "composer/installers",
- "version": "v1.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/composer/installers.git",
- "reference": "d78064c68299743e0161004f2de3a0204e33b804"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/composer/installers/zipball/d78064c68299743e0161004f2de3a0204e33b804",
- "reference": "d78064c68299743e0161004f2de3a0204e33b804",
- "shasum": ""
- },
- "require": {
- "composer-plugin-api": "^1.0"
- },
- "replace": {
- "roundcube/plugin-installer": "*",
- "shama/baton": "*"
- },
- "require-dev": {
- "composer/composer": "1.0.*@dev",
- "phpunit/phpunit": "4.1.*"
- },
- "type": "composer-plugin",
- "extra": {
- "class": "Composer\\Installers\\Plugin",
- "branch-alias": {
- "dev-master": "1.0-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Composer\\Installers\\": "src/Composer/Installers"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Kyle Robinson Young",
- "email": "kyle@dontkry.com",
- "homepage": "https://github.com/shama"
- }
- ],
- "description": "A multi-framework Composer library installer",
- "homepage": "https://composer.github.io/installers/",
- "keywords": [
- "Craft",
- "Dolibarr",
- "Hurad",
- "ImageCMS",
- "MODX Evo",
- "Mautic",
- "OXID",
- "Plentymarkets",
- "RadPHP",
- "SMF",
- "Thelia",
- "WolfCMS",
- "agl",
- "aimeos",
- "annotatecms",
- "attogram",
- "bitrix",
- "cakephp",
- "chef",
- "cockpit",
- "codeigniter",
- "concrete5",
- "croogo",
- "dokuwiki",
- "drupal",
- "elgg",
- "expressionengine",
- "fuelphp",
- "grav",
- "installer",
- "joomla",
- "kohana",
- "laravel",
- "lithium",
- "magento",
- "mako",
- "mediawiki",
- "modulework",
- "moodle",
- "phpbb",
- "piwik",
- "ppi",
- "puppet",
- "reindex",
- "roundcube",
- "shopware",
- "silverstripe",
- "symfony",
- "typo3",
- "wordpress",
- "yawik",
- "zend",
- "zikula"
- ],
- "time": "2016-08-13 20:53:52"
- },
- {
- "name": "crizzo/aboutus",
- "version": "2.0.4",
- "dist": {
- "type": "zip",
- "url": "https://www.phpbb.com/customise/db/download/121131/composer",
- "reference": null,
- "shasum": null
- },
- "require": {
- "php": ">=5.3.3"
- },
- "type": "phpbb-extension",
- "extra": {
- "display-name": "About us",
- "soft-require": {
- "phpbb/phpbb": ">=3.1.2"
- },
- "version-check": {
- "host": "www.phpbb.com",
- "directory": "/customise/db/extension/about_us",
- "filename": "version_check"
- }
- },
- "license": [
- "GPL-2.0"
- ],
- "authors": [
- {
- "name": "Christian Schnegelberger",
- "username": "Crizzo",
- "email": "kontakt@crizzo.de",
- "homepage": "http://www.crizzo.de",
- "role": "Developer/Founder"
- }
- ],
- "description": "About us is an extension which adds to phpBB 3.1 a about us or legal notice-page, where you can add your contact details and more.",
- "homepage": "https://www.phpbb.com/customise/db/extension/about_us/",
- "time": "2015-10-23 00:00:00"
- },
- {
- "name": "phpbb/autogroups",
- "version": "1.0.1",
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpbb-extensions/autogroups/zipball/38ffd4dfaa839310f42be43b32075c8237f239d0",
- "reference": "38ffd4dfaa839310f42be43b32075c8237f239d0",
- "shasum": ""
- },
- "require": {
- "composer/installers": "~1.0",
- "php": ">=5.3.3"
- },
- "require-dev": {
- "phing/phing": "2.4.*",
- "phpbb/epv": "dev-master"
- },
- "type": "phpbb-extension",
- "extra": {
- "display-name": "Auto Groups",
- "soft-require": {
- "phpbb/phpbb": ">=3.1.0,<3.2.*@dev"
- },
- "version-check": {
- "host": "www.phpbb.com",
- "directory": "/customise/db/extension/auto_groups",
- "filename": "version_check"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "GPL-2.0"
- ],
- "authors": [
- {
- "name": "Michael Cullum",
- "email": "michael@phpbb.com",
- "homepage": "http://michaelcullum.com",
- "role": "Extensions Team Consultant"
- },
- {
- "name": "Marc Alexander",
- "email": "admin@m-a-styles.de",
- "homepage": "http://www.m-a-styles.de",
- "role": "Extensions Team Consultant"
- },
- {
- "name": "Matt Friedman",
- "homepage": "http://mattfriedman.me",
- "role": "Extensions Development Team Lead"
- },
- {
- "name": "Nathan Guse",
- "email": "nathaniel.guse@gmail.com",
- "role": "Former Extensions Development Team Lead"
- },
- {
- "name": "Clemens Husung",
- "email": "wolfsblvt@pinkes-forum.de",
- "role": "Extensions Development Team"
- },
- {
- "name": "Lukasz Kaczynski",
- "role": "Former Extensions Development Team Member"
- },
- {
- "name": "John Peskens",
- "email": "info@forumhulp.com",
- "homepage": "http://forumhulp.com",
- "role": "Former Extensions Development Team Member"
- },
- {
- "name": "Ruslan Uzdenov",
- "homepage": "http://www.phpbbguru.net",
- "role": "Extensions Development Team"
- }
- ],
- "description": "An extension that can automate the process of adding and removing users from groups upon reaching specified milestones related to their post count, age, membership, and warnings count.",
- "homepage": "https://www.phpbb.com",
- "keywords": [
- "auto",
- "extension",
- "groups",
- "phpbb"
- ],
- "time": "2015-09-05 17:30:29"
- }
- ],
- "packages-dev": [],
- "aliases": [],
- "minimum-stability": "stable",
- "stability-flags": {
- "phpbb/phpbb": 5
- },
- "prefer-stable": true,
- "prefer-lowest": false,
- "platform": {
- "php": ">=5.5.9"
- },
- "platform-dev": []
-}
diff --git a/phpBB/download/file.php b/phpBB/download/file.php
index fbbabfb74f1..858dfd2c329 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -99,7 +99,7 @@
/* @var $phpbb_avatar_manager \phpbb\avatar\manager */
$phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
- if (is_file($phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php'))
+ if (@is_file($phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php'))
{
require_once($phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php');
}
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 949683e6b46..70fb763d8d5 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -24,7 +24,7 @@
class acp_extensions
{
- var $u_action;
+ public $u_action;
private $db;
diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php
index 66bb5ca8ac6..c6eb147b86e 100644
--- a/phpBB/language/en/acp/extensions.php
+++ b/phpBB/language/en/acp/extensions.php
@@ -152,16 +152,16 @@
'META_FIELD_INVALID' => 'Meta field %s is invalid.',
'EXTENSIONS_CATALOG_SETTINGS' => 'Extensions catalog settings',
- 'ENABLE_ON_INSTALL' => 'Enable extensions when installing',
- 'PURGE_ON_REMOVE' => 'Purge extensions when removing',
- 'ENABLE_PACKAGIST' => 'Enable Packagist usage',
- 'ENABLE_PACKAGIST_EXPLAIN' => 'Use packagist to browse extensions? Beware that packagist may contain extensions not validated by phpBB.',
- 'ENABLE_PACKAGIST_CONFIRM' => 'Are you sure you want to enable packagist?',
+ 'ENABLE_ON_INSTALL' => 'Enable extensions while installing',
+ 'PURGE_ON_REMOVE' => 'Purge extensions while removing',
+ 'ENABLE_PACKAGIST' => 'Search packagist',
+ 'ENABLE_PACKAGIST_EXPLAIN' => 'Search packagist for phpBB extensions. Beware that packagist may contain extensions not validated by the phpBB Extension Customisations Team.',
+ 'ENABLE_PACKAGIST_CONFIRM' => 'Are you sure you want to search packagist?',
'COMPOSER_REPOSITORIES' => 'Repositories',
- 'COMPOSER_REPOSITORIES_EXPLAIN' => 'List of composer repositories (must be the base url of the packages.json file), one per line.',
- 'NO_EXTENSION_AVAILABLE' => 'There is no extension available for your board',
+ 'COMPOSER_REPOSITORIES_EXPLAIN' => 'Add URLs to Composer repositories of phpBB extensions to search here, one per line (must be the base url of the packages.json file).',
+ 'NO_EXTENSION_AVAILABLE' => 'There are no extension available for your board',
- 'EXTENSION_MANAGED_SUCCESS' => 'The extension %s is now managed automatically.',
+ 'EXTENSION_MANAGED_SUCCESS' => 'The extension %s is now being managed automatically.',
'EXTENSIONS_INSTALLED' => 'Extensions successfully installed.',
'EXTENSIONS_REMOVED' => 'Extensions successfully removed.',
'EXTENSIONS_UPDATED' => 'Extensions successfully updated.',
diff --git a/phpBB/phpbb/composer/io/html_output_formatter.php b/phpBB/phpbb/composer/io/html_output_formatter.php
index 1629e1895cf..588be30a21e 100644
--- a/phpBB/phpbb/composer/io/html_output_formatter.php
+++ b/phpBB/phpbb/composer/io/html_output_formatter.php
@@ -41,9 +41,6 @@ class html_output_formatter extends \Composer\Console\HtmlOutputFormatter
= [
1 => 'bold',
4 => 'underscore',
- //5 => 'blink',
- //7 => 'reverse',
- //8 => 'conceal'
];
/**
diff --git a/phpBB/phpbb/composer/manager.php b/phpBB/phpbb/composer/manager.php
index b75bcad3d75..43ea8a25035 100644
--- a/phpBB/phpbb/composer/manager.php
+++ b/phpBB/phpbb/composer/manager.php
@@ -253,7 +253,7 @@ public function get_available_packages()
{
$this->available_packages = $this->cache->get('_composer_' . $this->package_type . '_available');
- if (true || !$this->available_packages)
+ if (!$this->available_packages)
{
$this->available_packages = $this->installer->get_available_packages($this->package_type);
$this->cache->put('_composer_' . $this->package_type . '_available', $this->available_packages, 24*60*60);
diff --git a/phpBB/phpbb/db/migration/data/v320/extensions_composer.php b/phpBB/phpbb/db/migration/data/v330/extensions_composer.php
similarity index 96%
rename from phpBB/phpbb/db/migration/data/v320/extensions_composer.php
rename to phpBB/phpbb/db/migration/data/v330/extensions_composer.php
index 957d1416837..7e12150e56d 100644
--- a/phpBB/phpbb/db/migration/data/v320/extensions_composer.php
+++ b/phpBB/phpbb/db/migration/data/v330/extensions_composer.php
@@ -11,7 +11,7 @@
*
*/
-namespace phpbb\db\migration\data\v320;
+namespace phpbb\db\migration\data\v330;
class extensions_composer extends \phpbb\db\migration\migration
{
diff --git a/phpBB/phpbb/di/container_builder.php b/phpBB/phpbb/di/container_builder.php
index 08400320b72..c4cb64144b3 100644
--- a/phpBB/phpbb/di/container_builder.php
+++ b/phpBB/phpbb/di/container_builder.php
@@ -416,7 +416,7 @@ protected function load_extensions()
$ext_container->compile();
$config = $ext_container->get('config');
- if (is_file($this->phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php'))
+ if (@is_file($this->phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php'))
{
require_once($this->phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php');
}
From 5376f676bf3574b39f15225d6806d499d387d16d Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Fri, 21 Apr 2017 23:11:17 +0200
Subject: [PATCH 192/431] [ticket/11150] Handle composer context transparently
PHPBB3-11150
---
phpBB/includes/acp/acp_extensions.php | 12 ----
phpBB/phpbb/composer/installer.php | 92 ++++++++++++++-------------
2 files changed, 47 insertions(+), 57 deletions(-)
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 70fb763d8d5..ba68158fd7e 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -172,13 +172,11 @@ public function main_mode($id, $mode)
/** @var \phpbb\composer\manager $composer_manager */
$composer_manager = $phpbb_container->get('ext.composer.manager');
- $this->request->enable_super_globals();
$managed_packages = [];
if ($composer_manager->check_requirements())
{
$managed_packages = $composer_manager->get_managed_packages();
}
- $this->request->disable_super_globals();
$this->list_enabled_exts($phpbb_extension_manager, $managed_packages);
$this->list_disabled_exts($phpbb_extension_manager, $managed_packages);
@@ -475,9 +473,7 @@ public function catalog_mode($id, $mode)
try
{
- $this->request->enable_super_globals();
$composer_manager->install((array) $extension, $composer_io);
- $this->request->disable_super_globals();
}
catch (\phpbb\exception\runtime_exception $e)
{
@@ -514,9 +510,7 @@ public function catalog_mode($id, $mode)
try
{
- $this->request->enable_super_globals();
$composer_manager->remove((array) $extension, $composer_io);
- $this->request->disable_super_globals();
}
catch (\phpbb\exception\runtime_exception $e)
{
@@ -553,9 +547,7 @@ public function catalog_mode($id, $mode)
try
{
- $this->request->enable_super_globals();
$composer_manager->update((array) $extension, $composer_io);
- $this->request->disable_super_globals();
}
catch (\phpbb\exception\runtime_exception $e)
{
@@ -592,9 +584,7 @@ public function catalog_mode($id, $mode)
try
{
- $this->request->enable_super_globals();
$composer_manager->start_managing($extension, $composer_io);
- $this->request->disable_super_globals();
}
catch (\phpbb\exception\runtime_exception $e)
{
@@ -684,10 +674,8 @@ public function catalog_mode($id, $mode)
$start = $this->request->variable('start', 0);
$base_url = $this->u_action;
- $this->request->enable_super_globals();
$available_extensions = $manager->get_available_packages();
$managed_packages = $manager->get_managed_packages();
- $this->request->disable_super_globals();
$extensions = array_slice($available_extensions, $start, 20);
diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php
index f6f2f1c83a2..a5153d5f055 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -27,6 +27,7 @@
use phpbb\config\config;
use phpbb\exception\runtime_exception;
use phpbb\filesystem\filesystem;
+use phpbb\request\request;
use Seld\JsonLint\ParsingException;
/**
@@ -76,12 +77,18 @@ class installer
*/
private $ext_json_file_backup;
+ /**
+ * @var request phpBB request object
+ */
+ private $request;
+
/**
* @param string $root_path phpBB root path
* @param filesystem $filesystem Filesystem object
+ * @param request $request phpBB request object
* @param config $config Config object
*/
- public function __construct($root_path, filesystem $filesystem, config $config = null)
+ public function __construct($root_path, filesystem $filesystem, request $request, config $config = null)
{
if ($config)
{
@@ -99,6 +106,7 @@ public function __construct($root_path, filesystem $filesystem, config $config =
}
$this->root_path = $root_path;
+ $this->request = $request;
putenv('COMPOSER_HOME=' . $filesystem->realpath($root_path) . '/store/composer');
}
@@ -115,19 +123,9 @@ public function __construct($root_path, filesystem $filesystem, config $config =
*/
public function install(array $packages, $whitelist, IOInterface $io = null)
{
- // The composer installers works with a path relative to the current directory
- $this->move_to_root();
-
- try
- {
+ $this->wrap(function() use ($packages, $whitelist, $io) {
$this->do_install($packages, $whitelist, $io);
- $this->restore_cwd();
- }
- catch (runtime_exception $e)
- {
- $this->restore_cwd();
- throw $e;
- }
+ });
}
/**
@@ -178,7 +176,6 @@ protected function do_install(array $packages, $whitelist, IOInterface $io = nul
catch (\Exception $e)
{
$this->restore_ext_json_file();
- $this->restore_cwd();
throw new runtime_exception('COMPOSER_CANNOT_INSTALL', [], $e);
}
@@ -186,7 +183,6 @@ protected function do_install(array $packages, $whitelist, IOInterface $io = nul
if ($result !== 0)
{
$this->restore_ext_json_file();
- $this->restore_cwd();
throw new runtime_exception($io->get_composer_error(), []);
}
@@ -203,21 +199,9 @@ protected function do_install(array $packages, $whitelist, IOInterface $io = nul
*/
public function get_installed_packages($types)
{
- // The composer installers works with a path relative to the current directory
- $this->move_to_root();
-
- try
- {
- $result = $this->do_get_installed_packages($types);
- $this->restore_cwd();
- }
- catch (runtime_exception $e)
- {
- $this->restore_cwd();
- throw $e;
- }
-
- return $result;
+ return $this->wrap(function() use ($types) {
+ return $this->do_get_installed_packages($types);
+ });
}
/**
@@ -275,21 +259,9 @@ protected function do_get_installed_packages($types)
*/
public function get_available_packages($type)
{
- // The composer installers works with a path relative to the current directory
- $this->move_to_root();
-
- try
- {
- $result = $this->do_get_available_packages($type);
- $this->restore_cwd();
- }
- catch (runtime_exception $e)
- {
- $this->restore_cwd();
- throw $e;
- }
-
- return $result;
+ return $this->wrap(function() use ($type) {
+ return $this->do_get_available_packages($type);
+ });
}
/**
@@ -704,4 +676,34 @@ protected function restore_cwd()
$this->original_cwd = null;
}
}
+
+ /**
+ * Wraps a callable in order to adjust the context needed by composer
+ *
+ * @param callable $callable
+ *
+ * @return mixed
+ */
+ protected function wrap(callable $callable)
+ {
+ // The composer installers works with a path relative to the current directory
+ $this->move_to_root();
+
+ // The composer installers uses some super globals
+ $super_globals = $this->request->super_globals_disabled();
+ $this->request->enable_super_globals();
+
+ try
+ {
+ return $callable();
+ }
+ finally
+ {
+ $this->restore_cwd();
+
+ if ($super_globals) {
+ $this->request->disable_super_globals();
+ }
+ }
+ }
}
From 1f9a269d787483108cf9ec0f6b8c0c5a2c0579e6 Mon Sep 17 00:00:00 2001
From: Tristan Darricau
Date: Fri, 21 Apr 2017 23:43:03 +0200
Subject: [PATCH 193/431] [ticket/11150] Makes the customisation db lync
dynamic
PHPBB3-11150
---
phpBB/adm/style/acp_ext_catalog.html | 2 +-
phpBB/composer.lock | 22 +++++++++----------
.../default/container/services_extensions.yml | 1 +
phpBB/includes/acp/acp_extensions.php | 2 +-
phpBB/includes/functions.php | 5 +++++
phpBB/includes/functions_acp.php | 5 +++++
phpBB/phpbb/composer/installer.php | 3 ++-
7 files changed, 26 insertions(+), 14 deletions(-)
diff --git a/phpBB/adm/style/acp_ext_catalog.html b/phpBB/adm/style/acp_ext_catalog.html
index 787b620e624..1be94258e82 100644
--- a/phpBB/adm/style/acp_ext_catalog.html
+++ b/phpBB/adm/style/acp_ext_catalog.html
@@ -7,7 +7,7 @@ {{ lang( 'EXTENSIONS_CATALOG') }}
{{ lang( 'EXTENSIONS_CATALOG_EXPLAIN') }}
- {{ lang('BROWSE_EXTENSIONS_DATABASE') }} • {{ lang('SETTINGS') }}
+ {{ lang('BROWSE_EXTENSIONS_DATABASE') }} • {{ lang('SETTINGS') }}
{% if pagination is defined %}
diff --git a/phpBB/composer.lock b/phpBB/composer.lock
index 81903906a7f..4fff2b628a2 100644
--- a/phpBB/composer.lock
+++ b/phpBB/composer.lock
@@ -96,32 +96,32 @@
},
{
"name": "composer/composer",
- "version": "1.2.0",
+ "version": "1.3.3",
"source": {
"type": "git",
"url": "https://github.com/composer/composer.git",
- "reference": "b49a006748a460f8dae6500ec80ed021501ce969"
+ "reference": "989d68725bc8ebf97e795d4feb386f52adb096e3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/composer/zipball/b49a006748a460f8dae6500ec80ed021501ce969",
- "reference": "b49a006748a460f8dae6500ec80ed021501ce969",
+ "url": "https://api.github.com/repos/composer/composer/zipball/989d68725bc8ebf97e795d4feb386f52adb096e3",
+ "reference": "989d68725bc8ebf97e795d4feb386f52adb096e3",
"shasum": ""
},
"require": {
"composer/ca-bundle": "^1.0",
"composer/semver": "^1.0",
"composer/spdx-licenses": "^1.0",
- "justinrainbow/json-schema": "^1.6 || ^2.0",
+ "justinrainbow/json-schema": "^1.6 || ^2.0 || ^3.0 || ^4.0",
"php": "^5.3.2 || ^7.0",
"psr/log": "^1.0",
"seld/cli-prompt": "^1.0",
"seld/jsonlint": "^1.4",
"seld/phar-utils": "^1.0",
- "symfony/console": "^2.5 || ^3.0",
- "symfony/filesystem": "^2.5 || ^3.0",
- "symfony/finder": "^2.2 || ^3.0",
- "symfony/process": "^2.1 || ^3.0"
+ "symfony/console": "^2.7 || ^3.0",
+ "symfony/filesystem": "^2.7 || ^3.0",
+ "symfony/finder": "^2.7 || ^3.0",
+ "symfony/process": "^2.7 || ^3.0"
},
"require-dev": {
"phpunit/phpunit": "^4.5 || ^5.0.5",
@@ -138,7 +138,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.2-dev"
+ "dev-master": "1.3-dev"
}
},
"autoload": {
@@ -169,7 +169,7 @@
"dependency",
"package"
],
- "time": "2016-07-18 23:28:52"
+ "time": "2017-03-08 10:06:43"
},
{
"name": "composer/semver",
diff --git a/phpBB/config/default/container/services_extensions.yml b/phpBB/config/default/container/services_extensions.yml
index dda02340ab5..e07ec1fd09c 100644
--- a/phpBB/config/default/container/services_extensions.yml
+++ b/phpBB/config/default/container/services_extensions.yml
@@ -16,6 +16,7 @@ services:
arguments:
- '%core.root_path%'
- '@filesystem'
+ - '@request'
- '@config'
ext.composer.manager:
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index ba68158fd7e..bedd387ee3d 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -820,7 +820,7 @@ public function list_enabled_exts(\phpbb\extension\manager $phpbb_extension_mana
if (isset($managed_packages[$block_vars['META_NAME']]))
{
- $this->output_actions('disabled', [
+ $this->output_actions('enabled', [
'UPDATE' => $this->u_catalog_action . '&action=update&extension=' . urlencode($block_vars['META_NAME']),
'REMOVE' => [
'url' => $this->u_catalog_action . '&action=remove&extension=' . urlencode($block_vars['META_NAME']),
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 15b35ae6468..c16792225d4 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -4324,6 +4324,9 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
$controller_helper = $phpbb_container->get('controller.helper');
$notification_mark_hash = generate_link_hash('mark_all_notifications_read');
+ $phpbb_version_parts = explode('.', PHPBB_VERSION, 3);
+ $phpbb_major = $phpbb_version_parts[0] . '.' . $phpbb_version_parts[1];
+
// The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array(
'SITENAME' => $config['sitename'],
@@ -4357,6 +4360,8 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
'SESSION_ID' => $user->session_id,
'ROOT_PATH' => $web_path,
'BOARD_URL' => $board_url,
+ 'PHPBB_VERSION' => PHPBB_VERSION,
+ 'PHPBB_MAJOR' => $phpbb_major,
'L_LOGIN_LOGOUT' => $l_login_logout,
'L_INDEX' => ($config['board_index_text'] !== '') ? $config['board_index_text'] : $user->lang['FORUM_INDEX'],
diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php
index 8bf42aa36ed..c79a84f8d49 100644
--- a/phpBB/includes/functions_acp.php
+++ b/phpBB/includes/functions_acp.php
@@ -66,6 +66,9 @@ function adm_page_header($page_title)
}
}
+ $phpbb_version_parts = explode('.', PHPBB_VERSION, 3);
+ $phpbb_major = $phpbb_version_parts[0] . '.' . $phpbb_version_parts[1];
+
$template->assign_vars(array(
'PAGE_TITLE' => $page_title,
'USERNAME' => $user->data['username'],
@@ -75,6 +78,8 @@ function adm_page_header($page_title)
'SESSION_ID' => $user->session_id,
'ROOT_PATH' => $phpbb_root_path,
'ADMIN_ROOT_PATH' => $phpbb_admin_path,
+ 'PHPBB_VERSION' => PHPBB_VERSION,
+ 'PHPBB_MAJOR' => $phpbb_major,
'U_LOGOUT' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout'),
'U_ADM_LOGOUT' => append_sid("{$phpbb_admin_path}index.$phpEx", 'action=admlogout'),
diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php
index a5153d5f055..6de57541fb0 100644
--- a/phpBB/phpbb/composer/installer.php
+++ b/phpBB/phpbb/composer/installer.php
@@ -701,7 +701,8 @@ protected function wrap(callable $callable)
{
$this->restore_cwd();
- if ($super_globals) {
+ if ($super_globals)
+ {
$this->request->disable_super_globals();
}
}
From 5e6ba1e46637737f5ad75acaf1d72694c86a9573 Mon Sep 17 00:00:00 2001
From: hanakin
Date: Tue, 25 Apr 2017 18:04:06 -0400
Subject: [PATCH 194/431] [ticket/15192] relocate class properly
PHPBB3-15192
---
phpBB/styles/prosilver/theme/colours.css | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css
index f5b0211f035..87b1030a068 100644
--- a/phpBB/styles/prosilver/theme/colours.css
+++ b/phpBB/styles/prosilver/theme/colours.css
@@ -54,11 +54,6 @@ th a:hover {
color: #a8d8ff;
}
-/* notification mark read link */
-.dropdown-extended a.mark_read {
- background-color: #ffffff;
-}
-
/* post body links */
.postlink {
border-bottom-color: #368ad2;
@@ -1116,6 +1111,10 @@ input.disabled {
color: #000000;
}
+.dropdown-extended a.mark_read {
+ background-color: #ffffff;
+}
+
.dropdown-extended .header,
.dropdown-extended .footer {
border-color: #b9b9b9;
From 308b0778cf7b51c752cb43ca8e5d7df71ca99593 Mon Sep 17 00:00:00 2001
From: hanakin
Date: Tue, 25 Apr 2017 18:06:44 -0400
Subject: [PATCH 195/431] [ticket/15192] Fix js selectors
PHPBB3-15192
---
phpBB/styles/prosilver/template/ajax.js | 10 +++++-----
phpBB/styles/prosilver/template/navbar_header.html | 2 +-
.../prosilver/template/notification_dropdown.html | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js
index 1bb3aabb9b8..a8409b3be8a 100644
--- a/phpBB/styles/prosilver/template/ajax.js
+++ b/phpBB/styles/prosilver/template/ajax.js
@@ -100,7 +100,7 @@ phpbb.addAjaxCallback('mark_topics_read', function(res, updateTopicLinks) {
// This callback will mark all notifications read
phpbb.addAjaxCallback('notification.mark_all_read', function(res) {
if (typeof res.success !== 'undefined') {
- phpbb.markNotifications($('#notification_list li.bg2'), 0);
+ phpbb.markNotifications($('[data-notification-unread="true"]'), 0);
phpbb.closeDarkenWrapper(3000);
}
});
@@ -108,8 +108,8 @@ phpbb.addAjaxCallback('notification.mark_all_read', function(res) {
// This callback will mark a notification read
phpbb.addAjaxCallback('notification.mark_read', function(res) {
if (typeof res.success !== 'undefined') {
- var unreadCount = Number($('#notification_list_button strong').html()) - 1;
- phpbb.markNotifications($(this).parent('li.bg2'), unreadCount);
+ var unreadCount = Number($('#notification-button strong').html()) - 1;
+ phpbb.markNotifications($(this).parent('[data-notification-unread="true"]'), unreadCount);
}
});
@@ -131,11 +131,11 @@ phpbb.markNotifications = function($popup, unreadCount) {
});
// Update the unread count.
- $('strong', '#notification_list_button').html(unreadCount);
+ $('strong', '#notification-button').html(unreadCount);
// Remove the Mark all read link and hide notification count if there are no unread notifications.
if (!unreadCount) {
$('#mark_all_notifications').remove();
- $('#notification_list_button > strong').addClass('hidden');
+ $('#notification-button > strong').addClass('hidden');
}
// Update page title
diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html
index b8080a6be37..ce3f76ae4e8 100644
--- a/phpBB/styles/prosilver/template/navbar_header.html
+++ b/phpBB/styles/prosilver/template/navbar_header.html
@@ -151,7 +151,7 @@
-
+
{L_NOTIFICATIONS} {NOTIFICATIONS_COUNT}
diff --git a/phpBB/styles/prosilver/template/notification_dropdown.html b/phpBB/styles/prosilver/template/notification_dropdown.html
index e444d8fb900..177160b1b84 100644
--- a/phpBB/styles/prosilver/template/notification_dropdown.html
+++ b/phpBB/styles/prosilver/template/notification_dropdown.html
@@ -1,4 +1,4 @@
-
+