• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/filelink.php
  • Класс: BitrixDiskFileLink
  • Вызов: FileLink::restore
public function restore($restoredBy)
{
	if (!$this->isDeleted())
	{
		return true;
	}

	$status = $this->restoreByLinkObject($restoredBy);
	if (!$status)
	{
		if ($this->errorCollection->getErrorByCode(self::ERROR_RESTORE_UNDER_LINK_WRONG_TYPE))
		{
			$this->errorCollection->clear();

			return parent::restore($restoredBy);
		}
	}

	return $status;
}