• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/update_class.php
  • Класс: CUpdateSystem
  • Вызов: CUpdateSystem::GetLoadedLangsUpdates
static function GetLoadedLangsUpdates($updates_dir, &$strError)
{
	$arResult = array();
	$strError_tmp = "";

	CUpdateSystem::AddMessage2Log("exec CUpdateSystem::GetLoadedLangsUpdates");

	$updates_dir_full = $_SERVER["DOCUMENT_ROOT"]."/bitrix/updates/".$updates_dir;
	if (!file_exists($updates_dir_full) || !is_dir($updates_dir_full))
	{
		$strError_tmp .= "[UGLLU01] ".str_replace("#FILE#", $updates_dir_full, GetMessage("SUPP_CU_NO_TMP_CAT")).".
"; } if ($strError_tmp == '') { if (!is_readable($updates_dir_full)) $strError_tmp .= "[UGLLU02] ".str_replace("#FILE#", $updates_dir_full, GetMessage("SUPP_CU_RD_TMP_CAT")).".
"; } if ($strError_tmp == '') { if (!file_exists($updates_dir_full."/update_info.xml") || !is_file($updates_dir_full."/update_info.xml")) { $strError_tmp .= "[UGLLU03] ".str_replace("#FILE#", $updates_dir_full."/update_info.xml", GetMessage("SUPP_RV_ER_DESCR_FILE")).".
"; } } if ($strError_tmp == '') { if (!is_readable($updates_dir_full."/update_info.xml")) $strError_tmp .= "[UGLLU04] ".str_replace("#FILE#", $updates_dir_full."/update_info.xml", GetMessage("SUPP_RV_READ_DESCR_FILE")).".
"; } if ($strError_tmp == '') { $content = file_get_contents($updates_dir_full."/update_info.xml"); } if ($strError_tmp == '') { $arRes = Array(); CUpdateSystem::ParseServerData($content, $arRes, $strError_tmp); } if ($strError_tmp == '') { if (isset($arRes["DATA"]["#"]["LANGS"]) && is_array($arRes["DATA"]["#"]["LANGS"]) && !empty($arRes["DATA"]["#"]["LANGS"])) { $arResult["LANGS"] = $arRes["DATA"]["#"]["LANGS"][0]; } if (isset($arRes["DATA"]["#"]["ERROR"]) && is_array($arRes["DATA"]["#"]["ERROR"]) && !empty($arRes["DATA"]["#"]["ERROR"])) { $arResult["ERROR"] = $arRes["DATA"]["#"]["ERROR"]; } if (isset($arRes["DATA"]["#"]["CLIENT"]) && is_array($arRes["DATA"]["#"]["CLIENT"]) && !empty($arRes["DATA"]["#"]["CLIENT"])) { $arResult["CLIENT"] = $arRes["DATA"]["#"]["CLIENT"][0]; } if (isset($arRes["DATA"]["#"]["SYSTEM"]) && is_array($arRes["DATA"]["#"]["SYSTEM"]) && !empty($arRes["DATA"]["#"]["SYSTEM"])) { $arResult["SYSTEM"] = $arRes["DATA"]["#"]["SYSTEM"][0]; } } if ($strError_tmp == '') { if ((!isset($arResult["CLIENT"]) || !is_array($arResult["CLIENT"])) && (!isset($arResult["ERROR"]) || !is_array($arResult["ERROR"]))) { $strError_tmp .= "[UGSLU01] ".GetMessage("SUPP_GAUT_SYSERR").".
"; } } if ($strError_tmp <> '') { CUpdateSystem::AddMessage2Log($strError_tmp, "CUGLLU"); $strError .= $strError_tmp; return false; } else return $arResult; }