Commit 68c0d41a authored by Yorre Rajaonarivelo's avatar Yorre Rajaonarivelo
Browse files

hot fix news

parent e09ccf3f
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment