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,14 +34,15 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
|
||||||
if ($shareType === OCP\Share::SHARE_TYPE_LINK && $shareWith == '') {
|
if ($shareType === OCP\Share::SHARE_TYPE_LINK && $shareWith == '') {
|
||||||
$shareWith = null;
|
$shareWith = null;
|
||||||
}
|
}
|
||||||
|
$itemSourceName=(isset($_POST['itemSourceName'])) ? $_POST['itemSourceName']:'';
|
||||||
|
|
||||||
$token = OCP\Share::shareItem(
|
$token = OCP\Share::shareItem(
|
||||||
$_POST['itemType'],
|
$_POST['itemType'],
|
||||||
$_POST['itemSource'],
|
$_POST['itemSource'],
|
||||||
$shareType,
|
$shareType,
|
||||||
$shareWith,
|
$shareWith,
|
||||||
$_POST['permissions'],
|
$_POST['permissions'],
|
||||||
$_POST['itemSourceName'],
|
$itemSourceName,
|
||||||
(!empty($_POST['expirationDate']) ? new \DateTime($_POST['expirationDate']) : null)
|
(!empty($_POST['expirationDate']) ? new \DateTime($_POST['expirationDate']) : null)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue