95 $params[
'SET_LOG_COUNTER'] !==
'Y'
96 || (isset($result[
'EXPERT_MODE_SET']) && $result[
'EXPERT_MODE_SET'])
104 (
int)$result[
'LOG_COUNTER'] > 0
108 \CUserCounter::clear(
109 $result[
'currentUserId'],
110 $result[
'COUNTER_TYPE'],
116 if ((
int)$result[
'LOG_COUNTER_IMPORTANT'] > 0)
118 \CUserCounter::clear(
119 $result[
'currentUserId'],
120 'BLOG_POST_IMPORTANT',
125 $res = getModuleEvents(
'socialnetwork',
'OnSonetLogCounterClear');
126 while ($eventFields = $res->fetch())
128 executeModuleEventEx($eventFields, [ $result[
'COUNTER_TYPE'], (
int)$result[
'LAST_LOG_TS'] ]);
131 elseif (in_array($result[
'COUNTER_TYPE'], [
'**',
'CRM_**' ],
true))
133 $pool = \Bitrix\Main\Application::getInstance()->getConnectionPool();
134 $pool->useMasterOnly(
true);
136 \CUserCounter::clear(
137 $result[
'currentUserId'],
138 $result[
'COUNTER_TYPE'],
145 $pool->useMasterOnly(
false);