Fix use Sharing Api with calendar
Without this fix it logs this error: Undefined index: itemSourceName at /opt/local/apache2/htdocs/oc7/core/ajax/share.php#44 I think the itemSourceName is only used with sharing files!
This commit is contained in:
parent
687cd7fe83
commit
e6b093bfb9
|
@ -34,6 +34,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
|
|||
if ($shareType === OCP\Share::SHARE_TYPE_LINK && $shareWith == '') {
|
||||
$shareWith = null;
|
||||
}
|
||||
$itemSourceName=(isset($_POST['itemSourceName'])) ? $_POST['itemSourceName']:'';
|
||||
|
||||
$token = OCP\Share::shareItem(
|
||||
$_POST['itemType'],
|
||||
|
@ -41,7 +42,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
|
|||
$shareType,
|
||||
$shareWith,
|
||||
$_POST['permissions'],
|
||||
$_POST['itemSourceName'],
|
||||
$itemSourceName,
|
||||
(!empty($_POST['expirationDate']) ? new \DateTime($_POST['expirationDate']) : null)
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue