Api - give error if share path is missing

This commit is contained in:
nathangray
2019-07-31 09:46:55 -06:00
parent 0f5aaa3ed9
commit 890cd4e4a4
2 changed files with 8 additions and 0 deletions

View File

@ -1902,6 +1902,10 @@ var AppJS = (function(){ "use strict"; return Class.extend(
*/
share_link: function(_action, _senders, _target, _writable, _files, _callback){
var path = _senders[0].id;
if(!path)
{
return this.egw.message(this.egw.lang('Missing share path. Unable to create share.'), 'error');
}
if(typeof _writable === 'undefined' && _action.parent && _action.parent.getActionById('shareWritable'))
{
_writable = _action.parent.getActionById('shareWritable').checked || false;