|
|
|
@ -820,17 +820,18 @@ class Share extends \OC\Share\Constants { |
|
|
|
|
* @param string $itemType |
|
|
|
|
* @param string $itemSource |
|
|
|
|
* @param int $shareType SHARE_TYPE_USER, SHARE_TYPE_GROUP, or SHARE_TYPE_LINK |
|
|
|
|
* @param string $recipient with whom was the file shared |
|
|
|
|
* @param boolean $status |
|
|
|
|
*/ |
|
|
|
|
public static function setSendMailStatus($itemType, $itemSource, $shareType, $status) { |
|
|
|
|
public static function setSendMailStatus($itemType, $itemSource, $shareType, $recipient, $status) { |
|
|
|
|
$status = $status ? 1 : 0; |
|
|
|
|
|
|
|
|
|
$query = \OC_DB::prepare( |
|
|
|
|
'UPDATE `*PREFIX*share` |
|
|
|
|
SET `mail_send` = ? |
|
|
|
|
WHERE `item_type` = ? AND `item_source` = ? AND `share_type` = ?'); |
|
|
|
|
WHERE `item_type` = ? AND `item_source` = ? AND `share_type` = ? AND `share_with` = ?'); |
|
|
|
|
|
|
|
|
|
$result = $query->execute(array($status, $itemType, $itemSource, $shareType)); |
|
|
|
|
$result = $query->execute(array($status, $itemType, $itemSource, $shareType, $recipient)); |
|
|
|
|
|
|
|
|
|
if($result === false) { |
|
|
|
|
\OC_Log::write('OCP\Share', 'Couldn\'t set send mail status', \OC_Log::ERROR); |
|
|
|
|