• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/location/import/import.php
  • Класс: BitrixSaleLocationImportis
  • Вызов: is::manageExistedLocationIndex
protected function manageExistedLocationIndex($memGroups)
{
	$before = implode(', ', array_keys($this->data['existedlocs']));

	$cleaned = false;
	foreach($this->data['existedlocs'] as $gid => $bundles)
	{
		if($gid == 'static' || in_array($gid, $memGroups))
			continue;

		$cleaned = true;

		$this->logMessage('Memory clean: REMOVING Group '.$gid);
		unset($this->data['existedlocs'][$gid]);
	}

	if($cleaned)
	{
		$this->logMessage('BEFORE memgroups: '.$before);
		$this->logMessage('Clear all but '.$memGroups[0]);

		$this->logMessage('AFTER memgroups: '.implode(', ', array_keys($this->data['existedlocs'])));
	}
}