Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pixel Humain
news
Commits
68c0d41a
Commit
68c0d41a
authored
Jan 26, 2022
by
Yorre Rajaonarivelo
Browse files
hot fix news
parent
e09ccf3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
models/News.php
View file @
68c0d41a
...
...
@@ -142,28 +142,8 @@ class News {
* News limited to 15
*/
public
static
function
getNewsForObjectId
(
$param
,
$sort
=
array
(
"created"
=>-
1
),
$type
,
$limit
=
6
,
$followsArrayIds
=
null
)
{
//this condition allows to retrieve only the news which has no "activityStream" type except with the verb "share"
$paramASfilter
=
array
(
'$or'
=>
array
(
array
(
'type'
=>
array
(
'$ne'
=>
ActivityStream
::
COLLECTION
)
),
array
(
'$and'
=>
array
(
array
(
'type'
=>
ActivityStream
::
COLLECTION
),
array
(
'verb'
=>
"share"
)
)
)
)
);
$param
=
[
'$and'
=>
[
$param
,
$paramASfilter
]
$param
[
"type"
]
=
[
'$ne'
=>
ActivityStream
::
COLLECTION
];
$res
=
PHDB
::
findAndSort
(
self
::
COLLECTION
,
$param
,
$sort
,
$limit
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment