summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-03-31 17:35:04 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-03-31 17:35:04 +0200
commitefcc2e87ab860c50f7904ac8e98914589a9c097a (patch)
tree9f4ac294a0f88d96f1a469a8a9b0f3c9e049dab6 /apps/files
parent116b257b4d1e9b986fc2d9a438b5c2cc92e3717f (diff)
downloadnextcloud-server-efcc2e87ab860c50f7904ac8e98914589a9c097a.tar.gz
nextcloud-server-efcc2e87ab860c50f7904ac8e98914589a9c097a.zip
Adjust by/self filter aswell and fix tests
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/lib/activity.php2
-rw-r--r--apps/files/tests/activitytest.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/files/lib/activity.php b/apps/files/lib/activity.php
index 007f9a1dda4..fff49ea4ea5 100644
--- a/apps/files/lib/activity.php
+++ b/apps/files/lib/activity.php
@@ -318,7 +318,7 @@ class Activity implements IExtension {
}
// Display actions from favorites only
- if ($filter === self::FILTER_FAVORITES || $filter === 'all' && $this->userSettingFavoritesOnly($user)) {
+ if ($filter === self::FILTER_FAVORITES || in_array($filter, ['all', 'by', 'self']) && $this->userSettingFavoritesOnly($user)) {
try {
$favorites = $this->helper->getFavoriteFilePaths($user);
} catch (\RuntimeException $e) {
diff --git a/apps/files/tests/activitytest.php b/apps/files/tests/activitytest.php
index 24240a03771..b8766f95224 100644
--- a/apps/files/tests/activitytest.php
+++ b/apps/files/tests/activitytest.php
@@ -234,7 +234,7 @@ class ActivityTest extends TestCase {
'items' => [],
'folders' => [],
],
- ' CASE WHEN `app` = ? THEN (`type` <> ? OR `type` <> ?) ELSE `app` <> ? END ',
+ ' CASE WHEN `app` = ? THEN ((`type` <> ? AND `type` <> ?)) ELSE `app` <> ? END ',
['files', Activity::TYPE_SHARE_CREATED, Activity::TYPE_SHARE_CHANGED, 'files']
],
[
@@ -242,7 +242,7 @@ class ActivityTest extends TestCase {
'items' => ['file.txt', 'folder'],
'folders' => ['folder'],
],
- ' CASE WHEN `app` = ? THEN (`type` <> ? OR `type` <> ? OR `file` = ? OR `file` = ? OR `file` LIKE ?) ELSE `app` <> ? END ',
+ ' CASE WHEN `app` = ? THEN ((`type` <> ? AND `type` <> ?) OR `file` = ? OR `file` = ? OR `file` LIKE ?) ELSE `app` <> ? END ',
['files', Activity::TYPE_SHARE_CREATED, Activity::TYPE_SHARE_CHANGED, 'file.txt', 'folder', 'folder/%', 'files']
],
];