mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Api - give error if share path is missing
This commit is contained in:
parent
0f5aaa3ed9
commit
890cd4e4a4
@ -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;
|
||||
|
@ -611,6 +611,10 @@ class Sharing
|
||||
*/
|
||||
public static function ajax_create($action, $path, $writable = false, $files = false, $extra = array())
|
||||
{
|
||||
if(!$path)
|
||||
{
|
||||
throw new Exception\WrongParameter('Missing share path. Unable to create share.');
|
||||
}
|
||||
$class = self::get_share_class(array('share_path' => $path));
|
||||
$extra = $extra + array(
|
||||
'share_writable' => $writable,
|
||||
|
Loading…
Reference in New Issue
Block a user