diff --git a/phpBB/adm/style/acp_ext_gallery.html b/phpBB/adm/style/acp_ext_gallery.html index b2ef033288..dfd8ffaf04 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 eec896cbfe..28f102e006 100644 --- a/phpBB/includes/acp/acp_extensions.php +++ b/phpBB/includes/acp/acp_extensions.php @@ -566,7 +566,7 @@ class acp_extensions $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 @@ class acp_extensions '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 40b4a5d9d4..4657c08bcf 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -89,6 +89,10 @@ $lang = array_merge($lang, array( '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 @@ $lang = array_merge($lang, array( '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 e3ba8e89ea..55a8778be0 100644 --- a/phpBB/language/en/acp/extensions.php +++ b/phpBB/language/en/acp/extensions.php @@ -45,6 +45,12 @@ $lang = array_merge($lang, array( '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 @@ $lang = array_merge($lang, array( '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...', + '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..', + '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 1941e79fff..286551ae95 100644 --- a/phpBB/phpbb/composer/manager.php +++ b/phpBB/phpbb/composer/manager.php @@ -271,6 +271,14 @@ class manager implements manager_interface 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 2572ba0831..ab36f58dc9 100644 --- a/phpBB/phpbb/composer/manager_interface.php +++ b/phpBB/phpbb/composer/manager_interface.php @@ -89,4 +89,11 @@ interface manager_interface * @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(); }