• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/update_class.php
  • Класс: CUpdater
  • Вызов: CUpdater::Init
function Init($curPath, $dbType, $updater, $curDir, $moduleID, $callType = "ALL")
{
	$this->errorMessage = array();
	$this->curPath = $curPath;
	$this->dbType = StrToUpper($dbType);
	$this->updater = $updater;
	$this->curModulePath = $curDir;
	$this->moduleID = $moduleID;

	$this->callType = array();
	if (!is_array($callType))
		$callType = array($callType);

	foreach ($callType as $val)
	{
		$val = strtoupper($val);
		switch ($val)
		{
			case "ALL":
				$this->callType = array("KERNEL", "PERSONAL", "DATABASE");
				break;
			case "KERNEL":
				if (!in_array("KERNEL", $this->callType))
					$this->callType[] = "KERNEL";
				break;
			case "PERSONAL":
				if (!in_array("PERSONAL", $this->callType))
					$this->callType[] = "PERSONAL";
				break;
			case "DATABASE":
				if (!in_array("DATABASE", $this->callType))
					$this->callType[] = "DATABASE";
				break;
			case "DB":
				if (!in_array("PERSONAL", $this->callType))
					$this->callType[] = "PERSONAL";
				if (!in_array("DATABASE", $this->callType))
					$this->callType[] = "DATABASE";
				break;
		}
	}

	$this->kernelPath = US_SHARED_KERNEL_PATH;
}