forked from extern/egroupware
Avoid error if extra parameter is not set
This commit is contained in:
parent
d9ecc966bb
commit
d24c6f2b7d
@ -1607,6 +1607,9 @@ var EgwApp = /** @class */ (function () {
|
||||
if (typeof _files === 'undefined' && _action.parent && _action.parent.getActionById('shareFiles')) {
|
||||
_files = _action.parent.getActionById('shareFiles').checked || false;
|
||||
}
|
||||
if (typeof _extra === 'undefined') {
|
||||
_extra = {};
|
||||
}
|
||||
return egw.json('EGroupware\\Api\\Sharing::ajax_create', [_action.id, path, _writable, _files, _extra], _callback ? _callback : this._share_link_callback, this, true, this).sendRequest();
|
||||
};
|
||||
EgwApp.prototype.share_merge = function (_action, _senders, _target) {
|
||||
|
@ -2011,6 +2011,10 @@ export abstract class EgwApp
|
||||
{
|
||||
_files = _action.parent.getActionById('shareFiles').checked || false;
|
||||
}
|
||||
if(typeof _extra === 'undefined')
|
||||
{
|
||||
_extra = {};
|
||||
}
|
||||
|
||||
return egw.json('EGroupware\\Api\\Sharing::ajax_create', [_action.id, path, _writable, _files, _extra],
|
||||
_callback ? _callback : this._share_link_callback, this, true, this).sendRequest();
|
||||
|
@ -663,7 +663,7 @@ class Sharing
|
||||
{
|
||||
throw new Exception\WrongParameter('Missing share path. Unable to create share.');
|
||||
}
|
||||
$extra = $extra + array(
|
||||
$extra = (array)$extra + array(
|
||||
'share_writable' => $writable,
|
||||
'include_files' => $files
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user