function serviceGetSpyPost($sAction, $iObjectId = 0, $iSenderId = 0, $aExtraParams = array()) { $aRet = array(); $aInfo = $this->_oDb->getFileInfo(array('fileId' => $iObjectId), true, array('medUri', 'medTitle', 'medProfId')); $aRet = array('params' => array('profile_link' => getProfileLink($iSenderId), 'profile_nick' => getNickName($iSenderId), 'entry_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aInfo['medUri'], 'entry_caption' => $aInfo['medTitle'], 'recipient_p_link' => getProfileLink($aInfo['medProfId']), 'recipient_p_nick' => getNickName($aInfo['medProfId'])), 'recipient_id' => 0); switch ($sAction) { case 'add': $aRet['lang_key'] = '_' . $this->_oConfig->getMainPrefix() . '_spy_added'; break; case 'rate': $aRet['lang_key'] = '_' . $this->_oConfig->getMainPrefix() . '_spy_rated'; $aRet['recipient_id'] = $aInfo['medProfId']; $aRet['spy_type'] = 'content_activity'; break; case 'commentPost': $aRet['lang_key'] = '_' . $this->_oConfig->getMainPrefix() . '_spy_comment_posted'; $aRet['recipient_id'] = $aInfo['medProfId']; $aRet['spy_type'] = 'content_activity'; break; } return $aRet; }