From 07a92d29df03a1a2c432382e35c0741e133787ea Mon Sep 17 00:00:00 2001 From: Dhruv Date: Thu, 7 Aug 2014 15:49:41 +0200 Subject: [PATCH 1/2] [ticket/12778] Automatically delete files on update PHPBB3-12778 --- phpBB/install/install_update.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 28777a8d24..7a423b622f 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -1063,6 +1063,14 @@ class install_update extends module $transfer->write_file($file_struct['filename'], $contents); } break; + + case 'deleted': + + if ($update_mode != 'download') + { + $transfer->delete_file($file_struct['filename']); + } + break; } } } From 54885416404db57ad0062799f0c22db3e472169d Mon Sep 17 00:00:00 2001 From: Dhruv Date: Thu, 7 Aug 2014 16:52:49 +0200 Subject: [PATCH 2/2] [ticket/12778] Rename the file to *.bak instead of deleting PHPBB3-12778 --- phpBB/install/install_update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 7a423b622f..82ca0fc18d 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -1068,7 +1068,7 @@ class install_update extends module if ($update_mode != 'download') { - $transfer->delete_file($file_struct['filename']); + $transfer->rename($file_struct['filename'], $file_struct['filename'] . '.bak'); } break; }