summaryrefslogtreecommitdiffstats
path: root/core/ajax/share.php
diff options
context:
space:
mode:
authorlibasys <sebastian.doell@libasys.de>2014-07-08 10:57:51 +0200
committerlibasys <sebastian.doell@libasys.de>2014-07-08 10:57:51 +0200
commite6b093bfb9bdf609a1a5743c8f80915dbd53ae35 (patch)
tree40200b3586a31b3a5d39d0cac18c1f14fa81d2e6 /core/ajax/share.php
parent687cd7fe83fc40d7bc7d2ba7df5b495bf7bebdca (diff)
downloadnextcloud-server-e6b093bfb9bdf609a1a5743c8f80915dbd53ae35.tar.gz
nextcloud-server-e6b093bfb9bdf609a1a5743c8f80915dbd53ae35.zip
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!
Diffstat (limited to 'core/ajax/share.php')
-rw-r--r--core/ajax/share.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php
index be72e36541a..98e5a05b272 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)
);