• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/location/import/import.php
  • Класс: BitrixSaleLocationImportImportProcess
  • Вызов: ImportProcess::onBeforePerformIteration
public function onBeforePerformIteration()
{
	if($this->options['ONLY_DELETE_ALL'])
		return;

	if(!$this->data['inited'])
	{
		$opts = $_REQUEST['OPTIONS'];

		if(!in_array($opts['SOURCE'], array(self::SOURCE_REMOTE, self::SOURCE_FILE)))
			throw new MainSystemException('Unknown import type');

		$sets = array();
		if($opts['SOURCE'] == self::SOURCE_REMOTE)
		{
			$sets = $this->normalizeQueryArray($_REQUEST['LOCATION_SETS']);
			if(empty($sets))
				throw new MainSystemException('Nothing to do (no sets selected)');
		}

		$this->data['settings'] = array(
			'sets' => $sets,
			'additional' => is_array($_REQUEST['ADDITIONAL']) ? array_flip(array_values($_REQUEST['ADDITIONAL'])) : array(),
			'options' => $opts
		);

		$this->buildTypeTable();
		$this->buildExternalSerivceTable();

		$this->data['inited'] = true;
	}

	if($timeLimit = intval($this->data['settings']['options']['TIME_LIMIT']))
		$this->setTimeLimit($timeLimit);
}