summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2013-05-02 11:45:12 -0400
committerMorris Jobke <morris.jobke@gmail.com>2013-10-18 10:34:30 +0200
commita2c80bbc687af788d8a5a3c520a24ac223ddc714 (patch)
tree68cf42697a59628627906d571b3957d0deea6bda /core
parent4cf328e3b941139f3a41a8a3631f3c74544eb094 (diff)
downloadnextcloud-server-a2c80bbc687af788d8a5a3c520a24ac223ddc714.tar.gz
nextcloud-server-a2c80bbc687af788d8a5a3c520a24ac223ddc714.zip
Don't show links option in dropdown if disabled
Diffstat (limited to 'core')
-rw-r--r--core/js/share.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/js/share.js b/core/js/share.js
index 270eab356e1..734bbbfe0ba 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -203,7 +203,12 @@ OC.Share={
html += '<input id="shareWith" type="text" placeholder="'+t('core', 'Share with')+'" />';
html += '<ul id="shareWithList">';
html += '</ul>';
- if (link) {
+ var linksAllowed = false;
+ $.ajax({type: 'GET', url: OC.filePath('core', 'ajax', 'appconfig.php'), data: { action:'getValue', app:'core', key:'shareapi_allow_links', defaultValue:'yes' }, async: false, success: function(result) {
+ if (result && result.status === 'success' && result.data === 'yes') {
+ linksAllowed = true;
+ }
+ }});
html += '<div id="link">';
html += '<input type="checkbox" name="linkCheckbox" id="linkCheckbox" value="1" /><label for="linkCheckbox">'+t('core', 'Share with link')+'</label>';
html += '<br />';