[Pkg-owncloud-commits] [owncloud] 07/131: Use the item name when refering to the unaccepted remote share
David Prévot
taffit at moszumanska.debian.org
Tue Aug 11 15:58:25 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v8.1.1
in repository owncloud.
commit ea731c5c66ef16fb795448ec892bef257b41e60c
Author: Joas Schilling <nickvergessen at owncloud.com>
Date: Thu Jul 2 12:24:20 2015 +0200
Use the item name when refering to the unaccepted remote share
---
apps/files_sharing/api/server2server.php | 8 +++++++-
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 3ecdf65..ecdfd8b 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 a21f572..6903301 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',
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list