diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2013-05-02 11:45:12 -0400 |
---|---|---|
committer | Morris Jobke <morris.jobke@gmail.com> | 2013-10-18 10:34:30 +0200 |
commit | a2c80bbc687af788d8a5a3c520a24ac223ddc714 (patch) | |
tree | 68cf42697a59628627906d571b3957d0deea6bda /core/js/share.js | |
parent | 4cf328e3b941139f3a41a8a3631f3c74544eb094 (diff) | |
download | nextcloud-server-a2c80bbc687af788d8a5a3c520a24ac223ddc714.tar.gz nextcloud-server-a2c80bbc687af788d8a5a3c520a24ac223ddc714.zip |
Don't show links option in dropdown if disabled
Diffstat (limited to 'core/js/share.js')
-rw-r--r-- | core/js/share.js | 7 |
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 />'; |