• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/volume/module/im.php
  • Класс: BitrixDiskVolumeModuleIm
  • Вызов: Im::isAllowClearStorage
public function isAllowClearStorage(DiskStorage $storage): bool
{
	static $imStorageId;
	if (empty($imStorageId))
	{
		$storageList = $this->getStorageList();
		if ($storageList[0] instanceof DiskStorage)
		{
			$imStorageId = $storageList[0]->getId();
		}
	}

	// disallow clearance if im is unavailable
	if ($storage instanceof DiskStorage)
	{
		if ($imStorageId === $storage->getId())
		{
			return $this->isMeasureAvailable();// returns false to prevent fatal error
		}
	}

	return true;
}