diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-03-20 09:49:33 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-03-20 09:49:33 +0100 |
commit | 7776e088d67d66f7c6394a7f7468a71cd3b58f90 (patch) | |
tree | 0af8a46db14f6276f59f423bc7d7e5d766af3de6 /apps/files_sharing | |
parent | 093efa458c16ea4a7f7fcaf3f98e1e0fb96624c4 (diff) | |
download | nextcloud-server-7776e088d67d66f7c6394a7f7468a71cd3b58f90.tar.gz nextcloud-server-7776e088d67d66f7c6394a7f7468a71cd3b58f90.zip |
Group sharing activities by user/group and file respectively
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/activity.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/activity.php b/apps/files_sharing/lib/activity.php index 0cd874d69f0..50ec2f297d7 100644 --- a/apps/files_sharing/lib/activity.php +++ b/apps/files_sharing/lib/activity.php @@ -202,6 +202,7 @@ class Activity implements IExtension { } else if ($app === 'files') { switch ($text) { case self::SUBJECT_SHARED_LINK_SELF: + return [0 => 'file']; case self::SUBJECT_SHARED_USER_SELF: case self::SUBJECT_SHARED_WITH_BY: return [0 => 'file', 1 => 'username']; @@ -225,6 +226,19 @@ class Activity implements IExtension { * @return integer|false */ public function getGroupParameter($activity) { + if ($activity['app'] === 'files') { + switch ($activity['subject']) { + case self::SUBJECT_SHARED_LINK_SELF: + case self::SUBJECT_SHARED_WITH_BY: + // Group by file name + return 0; + case self::SUBJECT_SHARED_USER_SELF: + case self::SUBJECT_SHARED_GROUP_SELF: + // Group by user/group + return 1; + } + } + return false; } |