From e0815309d0812d5b4dc5fa8ba7b9195712ee272b Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Wed, 13 Mar 2019 21:01:09 +0100 Subject: [PATCH] Fix wrong intends in js_upload --- js_upload/js_upload.php | 42 ++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/js_upload/js_upload.php b/js_upload/js_upload.php index 95d62aa68..83fb275a2 100644 --- a/js_upload/js_upload.php +++ b/js_upload/js_upload.php @@ -65,13 +65,13 @@ function getSelected(opt) { var selected = new Array(); var index = 0; for (var intLoop = 0; intLoop < opt.length; intLoop++) { - if ((opt[intLoop].selected) || - (opt[intLoop].checked)) { - index = selected.length; - //selected[index] = new Object; - selected[index] = opt[intLoop].value; - //selected[index] = intLoop; - } + if ((opt[intLoop].selected) || + (opt[intLoop].checked)) { + index = selected.length; + //selected[index] = new Object; + selected[index] = opt[intLoop].value; + //selected[index] = intLoop; + } } return selected; } @@ -106,22 +106,22 @@ function createUploader() { if (typeof acl != "undefined"){ uploader.setParams( { - newalbum : newalbum, - album : album, + newalbum : newalbum, + album : album, not_visible : document.getElementById('photos-upload-noshare').checked, group_allow : acl.allow_gid.join(','), contact_allow : acl.allow_cid.join(','), - group_deny : acl.deny_gid.join(','), + group_deny : acl.deny_gid.join(','), contact_deny : acl.deny_cid.join(',') }); } else { uploader.setParams( { - newalbum : newalbum, - album : album, + newalbum : newalbum, + album : album, not_visible : document.getElementById('photos-upload-noshare').checked, group_allow : getSelected(document.getElementById('group_allow')).join(','), contact_allow : getSelected(document.getElementById('contact_allow')).join(','), - group_deny : getSelected(document.getElementById('group_deny')).join(','), + group_deny : getSelected(document.getElementById('group_deny')).join(','), contact_deny : getSelected(document.getElementById('contact_deny')).join(',') }); } @@ -174,9 +174,9 @@ function js_upload_post_file(&$a,&$b) { $result = $a->data['upload_result']; - $b['src'] = $result['path']; - $b['filename'] = $result['filename']; - $b['filesize'] = filesize($b['src']); + $b['src'] = $result['path']; + $b['filename'] = $result['filename']; + $b['filesize'] = filesize($b['src']); } @@ -308,7 +308,7 @@ class qqFileUploader { */ function handleUpload(){ - if (!$this->file){ + if (!$this->file) { return ['error' => L10n::t('No files were uploaded.')]; } @@ -346,14 +346,14 @@ class qqFileUploader { if ($this->file->save()){ return [ - 'success'=>true, - 'path' => $this->file->getPath(), + 'success' => true, + 'path' => $this->file->getPath(), 'filename' => $filename . '.' . $ext ]; } else { return [ - 'error'=> L10n::t('Upload was cancelled, or server error encountered'), - 'path' => $this->file->getPath(), + 'error' => L10n::t('Upload was cancelled, or server error encountered'), + 'path' => $this->file->getPath(), 'filename' => $filename . '.' . $ext ]; }