• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/lib/component/base.php
  • Класс: BitrixIblockComponentBase
  • Вызов: Base::resortOldPrices
private function resortOldPrices($id)
{
	if (empty($this->oldData[$id]['PRICES']) || count($this->oldData[$id]['PRICES']) < 2)
		return;
	foreach (array_keys($this->oldData[$id]['PRICES']) as $priceCode)
		$this->oldData[$id]['PRICES'][$priceCode]['_SORT'] = $this->storage['PRICES'][$priceCode]['SORT'];
	unset($priceCode);
	MainTypeCollection::sortByColumn(
		$this->oldData[$id]['PRICES'],
		array('_SORT' => SORT_ASC, 'PRICE_ID' => SORT_ASC),
		'', null, true
	);
	foreach (array_keys($this->oldData[$id]['PRICES']) as $priceCode)
		unset($this->oldData[$id]['PRICES'][$priceCode]['_SORT']);
	unset($priceCode);
}