summaryrefslogtreecommitdiff
path: root/lib/scripts
diff options
context:
space:
mode:
authorAndreas Gohr <gohr@cosmocode.de>2014-06-19 12:01:49 +0200
committerAndreas Gohr <gohr@cosmocode.de>2014-06-19 12:01:49 +0200
commit8c66b72dd479bad18be7571cb97f8b09cc65488c (patch)
treeddc992981c91e78a32115d659d577b016653290e /lib/scripts
parentd96ca44fc9a1ee346cfda97d7a66b8d7716e6031 (diff)
downloadrpg-8c66b72dd479bad18be7571cb97f8b09cc65488c.tar.gz
rpg-8c66b72dd479bad18be7571cb97f8b09cc65488c.tar.bz2
fix IE upload when Array prototype has been modified
The edittable plugin broke uploading in IE8 (and maybe others) because the Handsontable script adds a function to the Array prototype and the uploading script did not properly check that.
Diffstat (limited to 'lib/scripts')
-rw-r--r--lib/scripts/fileuploader.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/scripts/fileuploader.js b/lib/scripts/fileuploader.js
index e75b8d3a5..d6278950b 100644
--- a/lib/scripts/fileuploader.js
+++ b/lib/scripts/fileuploader.js
@@ -226,7 +226,9 @@ qq.obj2url = function(obj, temp, prefixDone){
} else if ((typeof obj != 'undefined') && (obj !== null) && (typeof obj === "object")){
// for anything else but a scalar, we will use for-in-loop
for (var i in obj){
- add(obj[i], i);
+ if(obj.hasOwnProperty(i) && typeof obj[i] != 'function') {
+ add(obj[i], i);
+ }
}
} else {
uristrings.push(encodeURIComponent(temp) + '=' + encodeURIComponent(obj));