summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/api/server2server.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-07-02 12:24:20 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-07-02 12:26:06 +0200
commit7e3f8d3ac1c43f5eafe8e2740d75e635f9562f1f (patch)
tree9ef3efaaf8e382c785d24298b1a8963ca0dd7737 /apps/files_sharing/api/server2server.php
parentbfcb8ffeb3bf46963cb002feec07c08643ec9d82 (diff)
downloadnextcloud-server-7e3f8d3ac1c43f5eafe8e2740d75e635f9562f1f.tar.gz
nextcloud-server-7e3f8d3ac1c43f5eafe8e2740d75e635f9562f1f.zip
Use the item name when refering to the unaccepted remote share
Diffstat (limited to 'apps/files_sharing/api/server2server.php')
-rw-r--r--apps/files_sharing/api/server2server.php8
1 files changed, 7 insertions, 1 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);
}