_oConfig->CNF; $this->_aSearchableNamesExcept = array_merge($this->_aSearchableNamesExcept, array( $CNF['FIELD_PUBLISHED'], $CNF['FIELD_ANONYMOUS'], $CNF['FIELD_ALLOW_COMMENTS'] )); } /** * Entry post for Timeline module */ public function serviceGetTimelinePost($aEvent, $aBrowseParams = array()) { $CNF = &$this->_oConfig->CNF; $aResult = parent::serviceGetTimelinePost($aEvent, $aBrowseParams); if(empty($aResult) || !is_array($aResult) || empty($aResult['date'])) return $aResult; $aContentInfo = $this->_oDb->getContentInfoById($aEvent['object_id']); if($aContentInfo[$CNF['FIELD_PUBLISHED']] > $aResult['date']) $aResult['date'] = $aContentInfo[$CNF['FIELD_PUBLISHED']]; return $aResult; } public function serviceCheckAllowedCommentsPost($iContentId, $sObjectComments) { $CNF = &$this->_oConfig->CNF; $aContentInfo = $this->_oDb->getContentInfoById($iContentId); if ($aContentInfo && $aContentInfo[$CNF['FIELD_ALLOW_COMMENTS']] == 0) return false; return parent::serviceCheckAllowedCommentsPost($iContentId, $sObjectComments); } public function serviceCheckAllowedCommentsView($iContentId, $sObjectComments) { $CNF = &$this->_oConfig->CNF; $aContentInfo = $this->_oDb->getContentInfoById($iContentId); if ($aContentInfo && $aContentInfo[$CNF['FIELD_ALLOW_COMMENTS']] == 0) return false; return parent::serviceCheckAllowedCommentsView($iContentId, $sObjectComments); } } /** @} */