function _getObjectVoting($aEvent) { if (in_array($aEvent['type'], array('profile', 'friend')) || in_array($aEvent['action'], array('commentPost', 'comment_add'))) { return $this->_getObjectVotingDefault($aEvent['id']); } $sType = $aEvent['type']; $sAction = $aEvent['action']; $iObjectId = $aEvent['object_id']; if ($this->_oConfig->isGrouped($sType, $sAction, $iObjectId)) { return $this->_getObjectVotingDefault($aEvent['id']); } $oVoting = new BxWallVoting($sType, $iObjectId); if ($oVoting->isEnabled()) { return $oVoting; } return $this->_getObjectVotingDefault($aEvent['id']); }
function _getObjectVoting($aEvent) { if (in_array($aEvent['type'], array('profile', 'friend')) || $aEvent['action'] == 'commentPost') { return $this->_getObjectVotingDefault($aEvent['id']); } $sType = $aEvent['type']; $iObjectId = $aEvent['object_id']; if (strpos($iObjectId, ',') !== false) { return $this->_getObjectVotingDefault($aEvent['id']); } $oVoting = new BxWallVoting($sType, $iObjectId); if ($oVoting->isEnabled()) { return $oVoting; } return $this->_getObjectVotingDefault($aEvent['id']); }