aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/install/module/update_filesystem/task
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2016-12-03 14:42:27 +0100
committerTristan Darricau <github@nicofuma.fr>2016-12-03 14:42:27 +0100
commit3acee9a3eea8e3fdcef59876da273358a46903e8 (patch)
tree3ed42316c51a61a1f40fb4a2c2f5952efc64c11d /phpBB/phpbb/install/module/update_filesystem/task
parent487df8befc9477c742b2794593c2ddb290c1c678 (diff)
parent5895f56de05b637765a6583b8c51c1db3daabe91 (diff)
downloadforums-3acee9a3eea8e3fdcef59876da273358a46903e8.tar
forums-3acee9a3eea8e3fdcef59876da273358a46903e8.tar.gz
forums-3acee9a3eea8e3fdcef59876da273358a46903e8.tar.bz2
forums-3acee9a3eea8e3fdcef59876da273358a46903e8.tar.xz
forums-3acee9a3eea8e3fdcef59876da273358a46903e8.zip
Merge pull request #4189 from marc1706/ticket/14492
[ticket/14492] Improve send stats page and include VigLink * marc1706/ticket/14492: (47 commits) [ticket/14492] Add user service to installer & only instantiate if needed [ticket/14492] Fix redirection to help phpBB page [ticket/14492] Encode URI components in systemdata for stats [ticket/14492] Always update the time the stats were sent [ticket/14492] Update versions in files [ticket/14492] Add missing event variable [ticket/14492] Don't explicitly pass data providers by refs [ticket/14492] Update phpBB version and fix miscellaneous code issues [ticket/14492] Install all extensions if 'all' is specified for extensions [ticket/14492] Checkout master if viglink tag does not exist for latest version [ticket/14492] Add language variables for updating extensions [ticket/14492] Prevent timeouts in install & update extensions tasks [ticket/14492] Use same list for checking if extension should be updated [ticket/14492] Add missing config to schema_data.sql [ticket/14492] Unify version check for installing default extensions [ticket/14492] Use extension manager instead of finder and add try/catch [ticket/14492] Checkout viglink for each version depending on tags [ticket/14492] Remove unused use statement [ticket/14492] Redirect to help phpBB page after installation [ticket/14492] Properly retrieve version updating from ...
Diffstat (limited to 'phpBB/phpbb/install/module/update_filesystem/task')
-rw-r--r--phpBB/phpbb/install/module/update_filesystem/task/file_check.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/phpBB/phpbb/install/module/update_filesystem/task/file_check.php b/phpBB/phpbb/install/module/update_filesystem/task/file_check.php
index f4b3870148..5b48350e73 100644
--- a/phpBB/phpbb/install/module/update_filesystem/task/file_check.php
+++ b/phpBB/phpbb/install/module/update_filesystem/task/file_check.php
@@ -118,6 +118,17 @@ class file_check extends task_base
$this->iohandler->set_task_count($task_count);
$this->iohandler->set_progress('UPDATE_CHECK_FILES', 0);
+ // Create list of default extensions that should have been added prior
+ // to this update
+ $default_update_extensions = [];
+ foreach (\phpbb\install\module\update_database\task\update_extensions::$default_extensions_update as $version => $extensions)
+ {
+ if ($this->update_helper->phpbb_version_compare($update_info['version']['from'], $version, '>'))
+ {
+ $default_update_extensions = array_merge($default_update_extensions, $extensions);
+ }
+ }
+
foreach ($update_info['files'] as $key => $filename)
{
$old_file = $old_path . $filename;
@@ -138,6 +149,27 @@ class file_check extends task_base
$progress_count++;
$this->iohandler->set_progress('UPDATE_CHECK_FILES', $progress_count);
+ // Do not copy default extension again if the previous version was
+ // packaged with it but it does not exist (e.g. deleted by admin)
+ if (strpos($file, $this->phpbb_root_path . 'ext/') !== false)
+ {
+ $skip_file = false;
+ foreach ($default_update_extensions as $ext_name)
+ {
+ if (strpos($file, $this->phpbb_root_path . 'ext/' . $ext_name) !== false &&
+ !$this->filesystem->exists($this->phpbb_root_path . 'ext/' . $ext_name . '/composer.json'))
+ {
+ $skip_file = true;
+ break;
+ }
+ }
+
+ if ($skip_file)
+ {
+ continue;
+ }
+ }
+
if (!$this->filesystem->exists($file))
{
$file_update_info['new'][] = $filename;