• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/document/onlyoffice/restrictionmanager.php
  • Класс: BitrixDiskDocumentOnlyOfficeRestrictionManager
  • Вызов: RestrictionManager::deletePendingUsages
public function deletePendingUsages(): void
{
	$connection = Application::getConnection();
	$tableName = RestrictionLogTable::getTableName();
	$ttlTimeForPending = $connection->getSqlHelper()->convertToDbDateTime(
		DateTime::createFromTimestamp(time() - self::TTL_PENDING)
	);
	$statusPending = RestrictionLogTable::STATUS_PENDING;

	$connection->query( "
		DELETE FROM {$tableName}
		WHERE 
			UPDATE_TIME < {$ttlTimeForPending} AND STATUS = {$statusPending}
	");

}