|
|
@@ -1216,10 +1216,22 @@ class BxTimelineDb extends BxBaseModNotificationsDb
|
|
|
$mixedWhereSubclause['p4'] = "`{$sTableAlias}`.`promoted` <> '0'";
|
|
|
}
|
|
|
|
|
|
+ //--- 'For You' feed only: Channels
|
|
|
+ if($bForYou && in_array(BX_TIMELINE_FYFS_CHANNELS, $aForYouSources)) {
|
|
|
+ $oConnection = BxDolConnection::getObjectInstance($this->_oConfig->getObject('conn_subscriptions'));
|
|
|
+
|
|
|
+ //--- Join System posts received by following channels.
|
|
|
+ $aQueryParts = $oConnection->getConnectedContentAsSQLPartsExt($sTableAlias, 'owner_id', $aParams['owner_id']);
|
|
|
+ $aJoin1 = $aQueryParts['join'];
|
|
|
+
|
|
|
+ $mixedJoinSubclause['p5'] = "INNER JOIN `" . $aJoin1['table'] . "` AS `" . $aJoin1['table_alias'] . "` ON " . $aJoin1['condition'];
|
|
|
+ $mixedWhereSubclause['p5'] = "`{$sTableAlias}`.`type`='bx_channels'";
|
|
|
+ }
|
|
|
+
|
|
|
//--- 'For You' feed only: Add Hot posts
|
|
|
if($bForYou && in_array(BX_TIMELINE_FYFS_HOT, $aForYouSources)) {
|
|
|
- $mixedJoinSubclause['p5'] = "INNER JOIN `{$this->_sTableHotTrack}` ON `{$sTableAlias}`.`id`=`{$this->_sTableHotTrack}`.`event_id`";
|
|
|
- $mixedWhereSubclause['p5'] = "1";
|
|
|
+ $mixedJoinSubclause['p6'] = "INNER JOIN `{$this->_sTableHotTrack}` ON `{$sTableAlias}`.`id`=`{$this->_sTableHotTrack}`.`event_id`";
|
|
|
+ $mixedWhereSubclause['p6'] = "1";
|
|
|
}
|
|
|
|
|
|
//--- 'For You' feed only: Add posts from recommended friends
|
|
|
@@ -1229,8 +1241,8 @@ class BxTimelineDb extends BxBaseModNotificationsDb
|
|
|
]);
|
|
|
|
|
|
if(!empty($aList) && is_array($aList)) {
|
|
|
- $mixedJoinSubclause['p6'] = "";
|
|
|
- $mixedWhereSubclause['p6'] = "`{$sTableAlias}`.`owner_id` IN (" . $this->implode_escape(array_keys($aList)) . ")";
|
|
|
+ $mixedJoinSubclause['p7'] = "";
|
|
|
+ $mixedWhereSubclause['p7'] = "`{$sTableAlias}`.`owner_id` IN (" . $this->implode_escape(array_keys($aList)) . ")";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1241,8 +1253,8 @@ class BxTimelineDb extends BxBaseModNotificationsDb
|
|
|
]);
|
|
|
|
|
|
if(!empty($aList) && is_array($aList)) {
|
|
|
- $mixedJoinSubclause['p7'] = "";
|
|
|
- $mixedWhereSubclause['p7'] = "`{$sTableAlias}`.`owner_id` IN (" . $this->implode_escape(array_keys($aList)) . ")";
|
|
|
+ $mixedJoinSubclause['p8'] = "";
|
|
|
+ $mixedWhereSubclause['p8'] = "`{$sTableAlias}`.`owner_id` IN (" . $this->implode_escape(array_keys($aList)) . ")";
|
|
|
}
|
|
|
}
|
|
|
break;
|