Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Commits on Source (2)
[Sprint/HipsterHedgehog] (feat): Filter deleted entities on global feeds
· 6bf268bc
Emiliano Balbuena
authored
Jul 23, 2019
and
Mark Harding
committed
Jul 23, 2019
6bf268bc
Merge branch 'sprint.HipsterHedgehog/skip-deleted-global-feed-entities-1' into 'master'
· ca2a7d56
Mark Harding
authored
Jul 23, 2019
[Sprint/HipsterHedgehog] (feat): Filter deleted entities on global feeds See merge request
!226
ca2a7d56
Hide whitespace changes
Inline
Side-by-side
Core/Feeds/Top/Repository.php
View file @
ca2a7d56
...
...
@@ -191,6 +191,18 @@ class Repository
];
}
if
(
!
$opts
[
'container_guid'
]
&&
!
$opts
[
'owner_guid'
])
{
if
(
!
isset
(
$body
[
'query'
][
'function_score'
][
'query'
][
'bool'
][
'must_not'
]))
{
$body
[
'query'
][
'function_score'
][
'query'
][
'bool'
][
'must_not'
]
=
[];
}
$body
[
'query'
][
'function_score'
][
'query'
][
'bool'
][
'must_not'
][]
=
[
'term'
=>
[
'deleted'
=>
true
,
],
];
}
if
(
$opts
[
'custom_type'
])
{
$customTypes
=
Text
::
buildArray
(
$opts
[
'custom_type'
]);
...
...