aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/install/module/update_database
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-02-24 15:05:01 +0100
committerMarc Alexander <admin@m-a-styles.de>2016-12-03 14:23:34 +0100
commit65d6e338a99baa2f100d6bd4dea5cd76ac146ac3 (patch)
tree25e3f8c9f7a754e73294c44ca3619d3e0092a06c /phpBB/phpbb/install/module/update_database
parenteb1ade67681ee7c88845978eade07ad3ac96357a (diff)
downloadforums-65d6e338a99baa2f100d6bd4dea5cd76ac146ac3.tar
forums-65d6e338a99baa2f100d6bd4dea5cd76ac146ac3.tar.gz
forums-65d6e338a99baa2f100d6bd4dea5cd76ac146ac3.tar.bz2
forums-65d6e338a99baa2f100d6bd4dea5cd76ac146ac3.tar.xz
forums-65d6e338a99baa2f100d6bd4dea5cd76ac146ac3.zip
[ticket/14492] Allow specifying extensions to update & install
PHPBB3-14492
Diffstat (limited to 'phpBB/phpbb/install/module/update_database')
-rw-r--r--phpBB/phpbb/install/module/update_database/task/update_extensions.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/phpBB/phpbb/install/module/update_database/task/update_extensions.php b/phpBB/phpbb/install/module/update_database/task/update_extensions.php
index a73fa9b854..7a65ff1803 100644
--- a/phpBB/phpbb/install/module/update_database/task/update_extensions.php
+++ b/phpBB/phpbb/install/module/update_database/task/update_extensions.php
@@ -18,6 +18,7 @@ use phpbb\install\helper\config;
use phpbb\install\helper\iohandler\iohandler_interface;
use phpbb\install\helper\update_helper;
use phpbb\install\task_base;
+use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Finder\Finder;
/**
@@ -111,6 +112,9 @@ class enable_extensions extends task_base
$this->user->session_begin();
$this->user->setup(array('common', 'acp/common', 'cli'));
+ $input = new ArgvInput();
+ $update_extensions = explode(',', $input->getArgument('update-extensions'));
+
$update_info = $this->install_config->get('update_info_unprocessed', array());
if (!empty($update_info))
@@ -122,7 +126,8 @@ class enable_extensions extends task_base
$ext_name = preg_replace('#(.+[\\/\\\]ext[\\/\\\])(\w+)[\\/\\\](\w+)#', '$2/$3', dirname($file->getRealPath()));
// Skip extensions that were not added or updated during update
- if (!count(preg_grep('#ext/' . $ext_name . '#', $update_info['files'])))
+ if (!count(preg_grep('#ext/' . $ext_name . '#', $update_info['files'])) &&
+ !in_array($ext_name, $update_extensions) && $ext_name !== 'phpbb/viglink')
{
continue;
}