Browse Source

in case $_POST['itemSourceName'] does not exist we simply default it to null

remotes/origin/fix-10825
Thomas Müller 12 years ago
parent
commit
6d06a765f4
  1. 3
      core/ajax/share.php

3
core/ajax/share.php

@ -31,6 +31,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
try { try {
$shareType = (int)$_POST['shareType']; $shareType = (int)$_POST['shareType'];
$shareWith = $_POST['shareWith']; $shareWith = $_POST['shareWith'];
$itemSourceName = isset($_POST['itemSourceName']) ? $_POST['itemSourceName'] : null;
if ($shareType === OCP\Share::SHARE_TYPE_LINK && $shareWith == '') { if ($shareType === OCP\Share::SHARE_TYPE_LINK && $shareWith == '') {
$shareWith = null; $shareWith = null;
} }
@ -41,7 +42,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
$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…
Cancel
Save