aboutsummaryrefslogtreecommitdiffstats
path: root/addon/js_upload/js_upload.php
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-07-20 11:40:24 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2011-07-20 11:40:24 +0200
commit19c93adf846647a61e407e8172ea7153cb7f2c41 (patch)
tree4a3750df636bf641fd0de2f92287c305b2ae151d /addon/js_upload/js_upload.php
parent7a069c1438eb0c6b84e9e93985722a34b4bca4e1 (diff)
downloadvolse-hubzilla-19c93adf846647a61e407e8172ea7153cb7f2c41.tar.gz
volse-hubzilla-19c93adf846647a61e407e8172ea7153cb7f2c41.tar.bz2
volse-hubzilla-19c93adf846647a61e407e8172ea7153cb7f2c41.zip
Use popup ACL selector in photo upload. js_upload use new acl selector.
Diffstat (limited to 'addon/js_upload/js_upload.php')
-rw-r--r--addon/js_upload/js_upload.php28
1 files changed, 19 insertions, 9 deletions
diff --git a/addon/js_upload/js_upload.php b/addon/js_upload/js_upload.php
index 06a907603..331548f88 100644
--- a/addon/js_upload/js_upload.php
+++ b/addon/js_upload/js_upload.php
@@ -92,15 +92,25 @@ function createUploader() {
debug: true,
onSubmit: function(id,filename) {
-
- uploader.setParams( {
- newalbum : document.getElementById('photos-upload-newalbum').value,
- album : document.getElementById('photos-upload-album-select').value,
- group_allow : getSelected(document.getElementById('group_allow')).join(','),
- contact_allow : getSelected(document.getElementById('contact_allow')).join(','),
- group_deny : getSelected(document.getElementById('group_deny')).join(','),
- contact_deny : getSelected(document.getElementById('contact_deny')).join(',')
- });
+ if (typeof acl!="undefined"){
+ uploader.setParams( {
+ newalbum : document.getElementById('photos-upload-newalbum').value,
+ album : document.getElementById('photos-upload-album-select').value,
+ group_allow : acl.allow_gid.join(','),
+ contact_allow : acl.allow_cid.join(','),
+ group_deny : acl.deny_gid.join(','),
+ contact_deny : acl.deny_cid.join(',')
+ });
+ } else {
+ uploader.setParams( {
+ newalbum : document.getElementById('photos-upload-newalbum').value,
+ album : document.getElementById('photos-upload-album-select').value,
+ group_allow : getSelected(document.getElementById('group_allow')).join(','),
+ contact_allow : getSelected(document.getElementById('contact_allow')).join(','),
+ group_deny : getSelected(document.getElementById('group_deny')).join(','),
+ contact_deny : getSelected(document.getElementById('contact_deny')).join(',')
+ });
+ }
}
});
}