|
|
@ -946,20 +946,17 @@ class Share extends \OC\Share\Constants { |
|
|
|
$query->bindValue(4, $user); |
|
|
|
$query->bindValue(4, $user); |
|
|
|
$query->bindValue(5, \OCP\Share::SHARE_TYPE_LINK); |
|
|
|
$query->bindValue(5, \OCP\Share::SHARE_TYPE_LINK); |
|
|
|
|
|
|
|
|
|
|
|
$result = $query->execute(); |
|
|
|
$query->execute(); |
|
|
|
|
|
|
|
|
|
|
|
if ($result === 1) { |
|
|
|
|
|
|
|
\OC_Hook::emit('OCP\Share', 'post_set_expiration_date', array( |
|
|
|
\OC_Hook::emit('OCP\Share', 'post_set_expiration_date', array( |
|
|
|
'itemType' => $itemType, |
|
|
|
'itemType' => $itemType, |
|
|
|
'itemSource' => $itemSource, |
|
|
|
'itemSource' => $itemSource, |
|
|
|
'date' => $date, |
|
|
|
'date' => $date, |
|
|
|
'uidOwner' => $user |
|
|
|
'uidOwner' => $user |
|
|
|
)); |
|
|
|
)); |
|
|
|
} else { |
|
|
|
|
|
|
|
\OCP\Util::writeLog('sharing', "Couldn't set expire date'", \OCP\Util::ERROR); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ($result === 1) ? true : false; |
|
|
|
return true; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|