From 36460ebdf679f3cecb11afdc6e43e64195cc1d27 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 28 Jan 2016 20:24:51 +0100 Subject: [PATCH] [ticket/14492] Do not copy viglink on update if it was deleted PHPBB3-14492 --- .../install/module/update_filesystem/task/file_check.php | 9 +++++++++ 1 file changed, 9 insertions(+) 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..e4e0be0531 100644 --- a/phpBB/phpbb/install/module/update_filesystem/task/file_check.php +++ b/phpBB/phpbb/install/module/update_filesystem/task/file_check.php @@ -138,6 +138,15 @@ class file_check extends task_base $progress_count++; $this->iohandler->set_progress('UPDATE_CHECK_FILES', $progress_count); + // Do not copy viglink 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/phpbb/viglink') !== false && + $this->update_helper->phpbb_version_compare($update_info['version']['from'], '3.2.0', '>=') && + !$this->filesystem->exists($this->phpbb_root_path . 'ext/phpbb/viglink')) + { + continue; + } + if (!$this->filesystem->exists($file)) { $file_update_info['new'][] = $filename;