Adjust by/self filter aswell and fix tests
This commit is contained in:
parent
116b257b4d
commit
efcc2e87ab
|
@ -318,7 +318,7 @@ class Activity implements IExtension {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Display actions from favorites only
|
// 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 {
|
try {
|
||||||
$favorites = $this->helper->getFavoriteFilePaths($user);
|
$favorites = $this->helper->getFavoriteFilePaths($user);
|
||||||
} catch (\RuntimeException $e) {
|
} catch (\RuntimeException $e) {
|
||||||
|
|
|
@ -234,7 +234,7 @@ class ActivityTest extends TestCase {
|
||||||
'items' => [],
|
'items' => [],
|
||||||
'folders' => [],
|
'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']
|
['files', Activity::TYPE_SHARE_CREATED, Activity::TYPE_SHARE_CHANGED, 'files']
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
@ -242,7 +242,7 @@ class ActivityTest extends TestCase {
|
||||||
'items' => ['file.txt', 'folder'],
|
'items' => ['file.txt', 'folder'],
|
||||||
'folders' => ['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']
|
['files', Activity::TYPE_SHARE_CREATED, Activity::TYPE_SHARE_CHANGED, 'file.txt', 'folder', 'folder/%', 'files']
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue