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)
(fix) change repository filter from time_created to timestamp and fix resolver filter
· e20df67c
Juan Manuel Solaro
authored
Sep 09, 2019
e20df67c
(fix) apply fixer changes
· 4499d84d
Juan Manuel Solaro
authored
Sep 09, 2019
4499d84d
Hide whitespace changes
Inline
Side-by-side
Core/Entities/Delegates/FilterEntitiesDelegate.php
View file @
4499d84d
...
...
@@ -38,7 +38,7 @@ class FilterEntitiesDelegate
$filterByScheduled
=
false
;
if
(
$this
->
shouldFilterScheduled
(
$entity
->
getType
()))
{
$filterByScheduled
=
!
ACL
::
_
()
->
write
(
$entity
,
$this
->
user
)
||
!
(
$entity
->
getTimeCreated
()
<=
$this
->
time
);
&&
!
(
$entity
->
getTimeCreated
()
<=
$this
->
time
);
}
return
$this
->
acl
->
read
(
$entity
,
$this
->
user
)
&&
!
$filterByScheduled
;
}));
...
...
Core/Feeds/Scheduled/Repository.php
View file @
4499d84d
...
...
@@ -48,8 +48,8 @@ class Repository
'must'
=>
[
[
'range'
=>
[
'time
_created
'
=>
[
'gt'
=>
time
(),
'
@
time
stamp
'
=>
[
'gt'
=>
time
()
*
1000
,
]
]
],
...
...
Core/Feeds/Top/Repository.php
View file @
4499d84d
...
...
@@ -263,8 +263,8 @@ class Repository
$body
[
'query'
][
'function_score'
][
'query'
][
'bool'
][
'must'
][]
=
[
'range'
=>
[
'time
_created
'
=>
[
$time_created_upper
=>
(
int
)
(
$opts
[
'time_created_upper'
]
?:
time
()),
'
@
time
stamp
'
=>
[
$time_created_upper
=>
(
(
int
)
(
$opts
[
'time_created_upper'
]
?:
time
())
)
*
1000
,
],
],
];
...
...