diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-07-02 12:28:48 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-07-02 12:28:48 +0200 |
commit | aa7c8ad1914c10556ef874413abec912749b3b51 (patch) | |
tree | 3622421a54b2ebc4e0f19719ea545cc713bf582e /apps | |
parent | 95faaad5cffb8b7291b10cda4a6f640273019a7c (diff) | |
download | nextcloud-server-aa7c8ad1914c10556ef874413abec912749b3b51.tar.gz nextcloud-server-aa7c8ad1914c10556ef874413abec912749b3b51.zip |
Add the item name to the federated sahre activity
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/api/server2server.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/lib/activity.php | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/apps/files_sharing/api/server2server.php b/apps/files_sharing/api/server2server.php index ddf32f32e0e..8bda0bb8749 100644 --- a/apps/files_sharing/api/server2server.php +++ b/apps/files_sharing/api/server2server.php @@ -71,7 +71,7 @@ class Server2Server { $user = $owner . '@' . $this->cleanupRemote($remote); \OC::$server->getActivityManager()->publishActivity( - Activity::FILES_SHARING_APP, Activity::SUBJECT_REMOTE_SHARE_RECEIVED, array($user), '', array(), + Activity::FILES_SHARING_APP, Activity::SUBJECT_REMOTE_SHARE_RECEIVED, array($user, trim($name, '/')), '', array(), '', '', $shareWith, Activity::TYPE_REMOTE_SHARE, Activity::PRIORITY_LOW); return new \OC_OCS_Result(); diff --git a/apps/files_sharing/lib/activity.php b/apps/files_sharing/lib/activity.php index 90475c29774..e35abee8c87 100644 --- a/apps/files_sharing/lib/activity.php +++ b/apps/files_sharing/lib/activity.php @@ -150,6 +150,10 @@ class Activity implements IExtension { if ($app === self::FILES_SHARING_APP) { switch ($text) { case self::SUBJECT_REMOTE_SHARE_RECEIVED: + if (sizeof($params) === 2) { + // New activity ownCloud 8.2+ + return (string) $l->t('You received a new remote share %2$s from %1$s', $params); + } return (string) $l->t('You received a new remote share from %s', $params); case self::SUBJECT_REMOTE_SHARE_ACCEPTED: return (string) $l->t('%1$s accepted remote share %2$s', $params); @@ -193,6 +197,7 @@ class Activity implements IExtension { case self::SUBJECT_REMOTE_SHARE_UNSHARED: return array( 0 => '',// We can not use 'username' since the user is in a different ownCloud + //1 => 'file', in theory its a file, but it does not exist yet/anymore ); case self::SUBJECT_REMOTE_SHARE_ACCEPTED: case self::SUBJECT_REMOTE_SHARE_DECLINED: |