- Модуль: socialnetwork
- Путь к файлу: ~/bitrix/modules/socialnetwork/classes/general/log_counter.php
- Класс: CAllSocNetLogCounter
- Вызов: CAllSocNetLogCounter::getFollowJoin
static function getFollowJoin(int $logId = 0, string $userIdReference = 'U.ID', string $mode = ''): array
{
if (!in_array($mode, [ 'positive', 'negative' ], true))
{
return [ '', '' ];
}
if ($mode === 'positive')
{
$join = "
INNER JOIN b_sonet_log_follow LFW
ON LFW.USER_ID = " . $userIdReference . "
";
$condition = " (LFW.CODE = 'L" . $logId . "' OR LFW.CODE = '**') ";
}
else
{
$join = "
LEFT JOIN b_sonet_log_follow LFW2
ON LFW2.USER_ID = " . $userIdReference . "
";
$condition = " (LFW2.CODE = 'L" . $logId . "' AND LFW2.TYPE = 'N') ";
}
return [ $join, $condition ];
}