summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-07-08 10:33:15 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-07-08 10:33:15 +0200
commit312d82fe714c7878f2241c9ff567e14a0c5c817d (patch)
tree531c6e07da4b485eece5eabaf93a16e5a775fbdc
parent96b97d1567492903df104271d292c6d5dd12d1bf (diff)
parentea731c5c66ef16fb795448ec892bef257b41e60c (diff)
downloadnextcloud-server-312d82fe714c7878f2241c9ff567e14a0c5c817d.tar.gz
nextcloud-server-312d82fe714c7878f2241c9ff567e14a0c5c817d.zip
Merge pull request #17332 from owncloud/fix-temporary-mountpoint-name-in-activities
Fix the mount point name before creating the activities
-rw-r--r--apps/files_sharing/api/server2server.php8
-rw-r--r--apps/files_sharing/lib/activity.php2
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',