174 is_array($ratingVoteParams)
175 && isset($ratingVoteParams[
'OWNER_ID'])
176 ? (int)$ratingVoteParams[
'OWNER_ID']
190 if ($followValue ===
'N')
196 'commentId' => $fields[
'ID'],
197 'commentAuthorId' => $ratingVoteParams[
'OWNER_ID'],
198 'ratingEntityTypeId' => $ratingVoteParams[
'ENTITY_TYPE_ID'],
199 'ratingEntityId' => $ratingVoteParams[
'ENTITY_ID'],
202 $ratingVoteParams[
'ENTITY_PARAM'] =
'COMMENT';
204 $ratingVoteParams[
'ENTITY_TITLE'] = $ratingVoteParams[
'ENTITY_MESSAGE'];
207 'MESSAGE_TYPE' => IM_MESSAGE_SYSTEM,
208 'TO_USER_ID' => $userId,
209 'FROM_USER_ID' => (int)$ratingVoteParams[
'USER_ID'],
210 'NOTIFY_TYPE' => IM_NOTIFY_FROM,
211 'NOTIFY_MODULE' =>
'main',
212 'NOTIFY_EVENT' =>
'rating_vote',
214 'NOTIFY_MESSAGE' => \CIMEvent::getMessageRatingVote($ratingVoteParams),
215 'NOTIFY_MESSAGE_OUT' => \CIMEvent::getMessageRatingVote($ratingVoteParams,
true),
218 \CIMNotify::add($messageFields);
266 if (Loader::includeModule(
'im'))
270 $commentAuthorId = (!empty(
$params[
'commentAuthorId']) && (int)
$params[
'commentAuthorId'] > 0 ? (
int)
$params[
'commentAuthorId'] : 0);
272 $siteList = $intranetSiteId = $extranetSiteId =
false;
274 if (Loader::includeModule(
'extranet'))
277 $intranetSiteId = \CExtranet::getExtranetSiteID();
278 $extranetSiteId = \CSite::getDefSite();
279 $res = \CSite::getList(
"sort",
"desc", array(
"ACTIVE" =>
"Y"));
280 while($site = $res->fetch())
282 $siteList[$site[
"ID"]] = array(
283 "DIR" => (trim($site[
"DIR"]) !==
'' ? $site[
"DIR"] :
'/'),
284 "SERVER_NAME" => (trim($site[
"SERVER_NAME"]) !==
'' ? $site[
"SERVER_NAME"] : Option::get(
"main",
"server_name", $_SERVER[
"HTTP_HOST"]))
289 $contentId = Livefeed\Provider::getContentId([
290 'RATING_TYPE_ID' =>
$params[
'ratingEntityTypeId'],
291 'RATING_ENTITY_ID' =>
$params[
'ratingEntityId'],
295 !empty($contentId[
'ENTITY_TYPE'])
297 'ENTITY_TYPE' => $contentId[
'ENTITY_TYPE'],
298 'ENTITY_ID' => $contentId[
'ENTITY_ID'],
303 $liveFeedProvider->initSourceFields();
304 $originalLink = $liveFeedProvider->getLiveFeedUrl();
306 $result = \CIMEvent::getMessageRatingEntityURL(