aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/assets
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2019-09-20 22:23:06 +0200
committerMarc Alexander <admin@m-a-styles.de>2019-09-20 22:23:06 +0200
commita7c02304a56e29c0fd4833626ec692a6babcb269 (patch)
tree8faf99cb5e786106c1c8ccfa5d2091e2759d2fb0 /phpBB/assets
parentd6139846607a4fe3a13d5863b3fa6a52b1fe3c10 (diff)
parentf0afccb173fb728b6c70a8bd86c4d8869043581a (diff)
downloadforums-a7c02304a56e29c0fd4833626ec692a6babcb269.tar
forums-a7c02304a56e29c0fd4833626ec692a6babcb269.tar.gz
forums-a7c02304a56e29c0fd4833626ec692a6babcb269.tar.bz2
forums-a7c02304a56e29c0fd4833626ec692a6babcb269.tar.xz
forums-a7c02304a56e29c0fd4833626ec692a6babcb269.zip
Merge branch '3.2.x' into 3.3.x
Diffstat (limited to 'phpBB/assets')
-rw-r--r--phpBB/assets/javascript/plupload.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/phpBB/assets/javascript/plupload.js b/phpBB/assets/javascript/plupload.js
index fab1ca6d7c..5e8db8b035 100644
--- a/phpBB/assets/javascript/plupload.js
+++ b/phpBB/assets/javascript/plupload.js
@@ -90,6 +90,12 @@ phpbb.plupload.getSerializedData = function() {
obj['attachment_data[' + i + '][' + key + ']'] = datum[key];
}
}
+
+ // Insert form data
+ var $pluploadForm = $(phpbb.plupload.config.form_hook).first();
+ obj.creation_time = $pluploadForm.find('input[type=hidden][name="creation_time"]').val();
+ obj.form_token = $pluploadForm.find('input[type=hidden][name="form_token"]').val();
+
return obj;
};
@@ -264,6 +270,17 @@ phpbb.plupload.deleteFile = function(row, attachId) {
return;
}
+
+ // Handle errors while deleting file
+ if (typeof response.error !== 'undefined') {
+ phpbb.alert(phpbb.plupload.lang.ERROR, response.error.message);
+
+ // We will have to assume that the deletion failed. So leave the file status as uploaded.
+ row.find('.file-status').toggleClass('file-uploaded');
+
+ return;
+ }
+
phpbb.plupload.update(response, 'removal', index);
// Check if the user can upload files now if he had reached the max files limit.
phpbb.plupload.handleMaxFilesReached();