• Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/lib/component/loglist/processor.php
  • Класс: BitrixSocialnetworkComponentLogListProcessor
  • Вызов: Processor::processLastTimestamp
public function processLastTimestamp(&$result): void
{
	$request = $this->getRequest();
	$params = $this->getComponent()->arParams;

	$result['LAST_LOG_TS'] = (isset($params['LAST_LOG_TIMESTAMP']) ? (int)$params['LAST_LOG_TIMESTAMP'] : (int)$request->get('ts'));

	if (
		$params['LOG_ID'] <= 0
		&& (
			!$result['AJAX_CALL']
			|| $result['bReload']
		)
	)
	{
		$result['LAST_LOG_TS'] = CUserCounter::getLastDate($result['currentUserId'], $result['COUNTER_TYPE']);

		if ($result['LAST_LOG_TS'] == 0)
		{
			$result['LAST_LOG_TS'] = 1;
		}
		else
		{
			//We substruct TimeZone offset in order to get server time
			//because of template compatibility
			$result['LAST_LOG_TS'] -= $result['TZ_OFFSET'];
		}
	}
}