diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-07-02 12:24:20 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-07-02 12:35:30 +0200 |
commit | ea731c5c66ef16fb795448ec892bef257b41e60c (patch) | |
tree | 743d31029f92d4a139ca26f0e2ef815360f26674 | |
parent | d6b24c7bbc13a813899e7aa41f3ea5edc0a01ae4 (diff) | |
download | nextcloud-server-ea731c5c66ef16fb795448ec892bef257b41e60c.tar.gz nextcloud-server-ea731c5c66ef16fb795448ec892bef257b41e60c.zip |
Use the item name when refering to the unaccepted remote share
-rw-r--r-- | apps/files_sharing/api/server2server.php | 8 | ||||
-rw-r--r-- | apps/files_sharing/lib/activity.php | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/apps/files_sharing/api/server2server.php b/apps/files_sharing/api/server2server.php index 3ecdf65dc74..ecdfd8bb145 100644 --- a/apps/files_sharing/api/server2server.php +++ b/apps/files_sharing/api/server2server.php @@ -170,8 +170,14 @@ class Server2Server { $query = \OCP\DB::prepare('DELETE FROM `*PREFIX*share_external` WHERE `remote_id` = ? AND `share_token` = ?'); $query->execute(array($id, $token)); + if ($share['accepted']) { + $path = trim($mountpoint, '/'); + } else { + $path = trim($share['name'], '/'); + } + \OC::$server->getActivityManager()->publishActivity( - 'files_sharing', \OCA\Files_Sharing\Activity::SUBJECT_REMOTE_SHARE_UNSHARED, array($owner, $mountpoint), '', array(), + 'files_sharing', \OCA\Files_Sharing\Activity::SUBJECT_REMOTE_SHARE_UNSHARED, array($owner, $path), '', array(), '', '', $user, \OCA\Files_Sharing\Activity::TYPE_REMOTE_SHARE, \OCA\Files_Sharing\Activity::PRIORITY_MEDIUM); } diff --git a/apps/files_sharing/lib/activity.php b/apps/files_sharing/lib/activity.php index a21f57235c9..6903301a4da 100644 --- a/apps/files_sharing/lib/activity.php +++ b/apps/files_sharing/lib/activity.php @@ -190,12 +190,12 @@ class Activity implements IExtension { if ($app === self::FILES_SHARING_APP) { switch ($text) { case self::SUBJECT_REMOTE_SHARE_RECEIVED: + case self::SUBJECT_REMOTE_SHARE_UNSHARED: return array( 0 => '',// We can not use 'username' since the user is in a different ownCloud ); case self::SUBJECT_REMOTE_SHARE_ACCEPTED: case self::SUBJECT_REMOTE_SHARE_DECLINED: - case self::SUBJECT_REMOTE_SHARE_UNSHARED: return array( 0 => '',// We can not use 'username' since the user is in a different ownCloud 1 => 'file', |