• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/tradingplatform/vk/vk.php
  • Класс: BitrixSaleTradingPlatformVkVk
  • Вызов: Vk::unsetActiveById
public function unsetActiveById($exportId)
{
	$settings = $this->getSettings();
	if (isset($settings[$exportId]) && is_array($settings[$exportId]))
		$settings[$exportId]["EXPORT_SETTINGS"]["ACTIVE"] = "N";

//		check all profiles for active
	$bActiveAll = false;
	foreach ($settings as $id => $exportSettings)
	{
		if ($this->isActiveById($id))
			$bActiveAll = true;
	}

//		if no one profile is active - unactive all platform
	if (!$bActiveAll)
		$this->unsetActive();

	if (isset($settings[$exportId]) && is_array($settings[$exportId]))
		return $this->saveSettings(array('SETTINGS' => $settings[$exportId], 'EXPORT_ID' => $exportId));

	else
		return false;
}