summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-03-24 20:23:36 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-03-24 20:23:36 +0100
commit1db177b84102e1285359fe9effb91f015d8ff634 (patch)
tree6dfc76e2f0dcd2ecd9e030ed28cd5aa3a4271338 /apps
parent09ea2609571e0786682d56d92922133f90932feb (diff)
parent7776e088d67d66f7c6394a7f7468a71cd3b58f90 (diff)
downloadnextcloud-server-1db177b84102e1285359fe9effb91f015d8ff634.tar.gz
nextcloud-server-1db177b84102e1285359fe9effb91f015d8ff634.zip
Merge pull request #15055 from owncloud/share-activity-grouping
Group sharing activities by user/group and file respectively
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/activity.php14
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;
}