- Модуль: main
- Путь к файлу: ~/bitrix/modules/main/classes/general/update_client_partner.php
- Класс: CUpdateClientPartner
- Вызов: CUpdateClientPartner::__RunUpdaterScript
static function __RunUpdaterScript($path, &$strError, $updateDirFrom, $moduleID)
{
global $DBType, $DB, $APPLICATION, $USER;
if (!isset($GLOBALS["UPDATE_STRONG_UPDATE_CHECK"])
|| ($GLOBALS["UPDATE_STRONG_UPDATE_CHECK"] != "Y" && $GLOBALS["UPDATE_STRONG_UPDATE_CHECK"] != "N"))
{
$GLOBALS["UPDATE_STRONG_UPDATE_CHECK"] = ((US_CALL_TYPE != "DB") ? COption::GetOptionString("main", "strong_update_check", "Y") : "Y");
}
$strongUpdateCheck = $GLOBALS["UPDATE_STRONG_UPDATE_CHECK"];
$DOCUMENT_ROOT = $_SERVER["DOCUMENT_ROOT"];
$path = str_replace("\", "/", $path);
$updaterPath = dirname($path);
$updaterPath = mb_substr($updaterPath, mb_strlen($_SERVER["DOCUMENT_ROOT"]));
$updaterPath = Trim($updaterPath, " tnr x0B/\");
if ($updaterPath <> '')
$updaterPath = "/".$updaterPath;
$updaterName = mb_substr($path, mb_strlen($_SERVER["DOCUMENT_ROOT"]));
CUpdateClientPartner::AddMessage2Log("Run updater '".$updaterName."'", "CSURUS1");
$updater = new CUpdater();
$updater->Init($updaterPath, 'mysql', $updaterName, $updateDirFrom, $moduleID, US_CALL_TYPE);
$errorMessage = "";
include($path);
if ($errorMessage <> '')
$strError .= $errorMessage;
if (is_array($updater->errorMessage) && !empty($updater->errorMessage))
$strError .= implode("n", $updater->errorMessage);
unset($updater);
}