diff options
Diffstat (limited to 'phpBB/includes/acp/acp_language.php')
-rw-r--r-- | phpBB/includes/acp/acp_language.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php index 153c200aeb..5064e1848f 100644 --- a/phpBB/includes/acp/acp_language.php +++ b/phpBB/includes/acp/acp_language.php @@ -320,7 +320,16 @@ class acp_language } $transfer->rename($lang_path . $file, $lang_path . $file . '.bak'); - $transfer->copy_file('store/' . $lang_path . $file, $lang_path . $file); + $result = $transfer->copy_file('store/' . $lang_path . $file, $lang_path . $file); + + if ($result === false) + { + // If failed, try to rename again and print error out... + $transfer->rename($lang_path . $file . '.bak', $lang_path . $file); + + trigger_error($user->lang['UPLOAD_FAILED'] . adm_back_link($this->u_action . '&action=details&id=' . $lang_id . '&language_file=' . urlencode($selected_lang_file)), E_USER_WARNING); + } + $transfer->close_session(); // Remove from storage folder |