From e6b093bfb9bdf609a1a5743c8f80915dbd53ae35 Mon Sep 17 00:00:00 2001 From: libasys Date: Tue, 8 Jul 2014 10:57:51 +0200 Subject: [PATCH] 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! --- core/ajax/share.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/ajax/share.php b/core/ajax/share.php index be72e36541..98e5a05b27 100644 --- a/core/ajax/share.php +++ b/core/ajax/share.php @@ -34,14 +34,15 @@ 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'], $_POST['itemSource'], $shareType, $shareWith, $_POST['permissions'], - $_POST['itemSourceName'], + $itemSourceName, (!empty($_POST['expirationDate']) ? new \DateTime($_POST['expirationDate']) : null) );