20 $this->current_result =
false;
21 $this->started =
false;
22 $this->report_id =
false;
23 $this->report_info =
"";
24 $this->checklist_path =
$_SERVER[
"DOCUMENT_ROOT"] .
"/bitrix/modules/main/checklist_structure.php";
25 if (file_exists($this->checklist_path))
27 $arCheckList = include($this->checklist_path);
38 if (is_array($arCustomChecklist[
"CATEGORIES"]))
40 foreach ($arCustomChecklist[
"CATEGORIES"] as $section_id => $arSectionFields)
42 if (!$arCheckList[
"CATEGORIES"][$section_id])
44 $arCheckList[
"CATEGORIES"][$section_id] = $arSectionFields;
48 if (is_array($arCustomChecklist[
"POINTS"]))
50 foreach ($arCustomChecklist[
"POINTS"] as $point_id => $arPointFields)
52 $parent = $arCustomChecklist[
"POINTS"][$point_id][
"PARENT"];
53 if (!$arCheckList[
"POINTS"][$point_id] && array_key_exists($parent, $arCheckList[
"CATEGORIES"]))
55 $arCheckList[
"POINTS"][$point_id] = $arPointFields;
61 $this->checklist = $arCheckList;
70 if ($arCurrentResult =
$dbResult->Fetch())
72 $this->current_result = unserialize($arCurrentResult[
"STATE"], [
'allowed_classes' =>
false]);
75 $this->report_id = intval(
$ID);
76 unset($arCurrentResult[
"STATE"]);
77 $this->report_info = $arCurrentResult;
82 if (empty($this->current_result[
$key]))
86 unset($this->checklist[
"POINTS"][
$key]);
90 $this->current_result[
$key] = [
97 if ($this->current_result !=
false && $this->report_id ==
false)
99 $this->started =
true;
124 "REQUIRE_CHECK" => 0,
126 "NOT_REQUIRE_CHECK" => 0,
127 "NOT_REQUIRE_SKIP" => 0,
132 if ((
$ID !=
false && array_key_exists(
$ID, $this->checklist[
"CATEGORIES"])) ||
$ID ==
false)
136 if (!empty($arPoints))
138 foreach ($arPoints as $arPointFields)
140 if ($arPointFields[
"STATE"][
"STATUS"] ==
"A")
143 if (isset($arPointFields[
'REQUIRE']) && $arPointFields[
'REQUIRE'] ==
'Y')
148 if ($arPointFields[
"STATE"][
"STATUS"] ==
"F")
152 if ($arPointFields[
"STATE"][
"STATUS"] ==
"W")
156 if (isset($arPointFields[
"REQUIRE"]) && $arPointFields[
"REQUIRE"] ==
"Y")
159 if ($arPointFields[
"STATE"][
"STATUS"] ==
"A")
163 elseif ($arPointFields[
"STATE"][
"STATUS"] ==
"S")
170 if ($arPointFields[
"STATE"][
"STATUS"] ==
"A")
174 elseif ($arPointFields[
"STATE"][
"STATUS"] ==
"S")
190 $arResult[
"TOTAL"] += $arSubSectionStat[
"TOTAL"];
191 $arResult[
"CHECK"] += $arSubSectionStat[
"CHECK"];
192 $arResult[
"FAILED"] += $arSubSectionStat[
"FAILED"];
193 $arResult[
"WAITING"] += $arSubSectionStat[
"WAITING"];
194 $arResult[
"REQUIRE"] += $arSubSectionStat[
"REQUIRE"];
195 $arResult[
"REQUIRE_CHECK"] += $arSubSectionStat[
"REQUIRE_CHECK"];
196 $arResult[
"REQUIRE_SKIP"] += $arSubSectionStat[
"REQUIRE_SKIP"];
217 if (is_array($arCheckList) && !empty($arCheckList))
223 if (
$arFields[
"PARENT"] == $arSectionCode || $arSectionCode ==
false)
242 if (empty($arSectionFields[
"CATEGORIES"]))
245 $arSectionFields[
"CATEGORIES"] = [];
247 if (empty($arSectionFields[
"PARENT"]))
268 if (!$arTestID || empty($arPointFields) || $this->report_id)
274 is_array($this->current_result) && isset($this->current_result[$arTestID])
275 ? $this->current_result[$arTestID]
278 if (!$arPointFields[
"STATUS"])
280 $arPointFields[
"STATUS"] = $currentFields[
"STATUS"];
283 $this->current_result[$arTestID] = $arPointFields;
291 $file =
$_SERVER[
"DOCUMENT_ROOT"] .
"/bitrix/modules/main/lang/" . LANG .
"/admin/checklist/" .
$ID .
".html";
293 if (file_exists($file))
295 $howTo = file_get_contents($file);
299 if ($convertEncoding)
303 if ($targetEncoding !==
'utf-8' || !preg_match(
'//u', $howTo))
311 "DESC" =>
GetMessage(
"CL_" .
$ID .
"_DESC", [
'#LANG#' => LANG]),
312 "AUTOTEST_DESC" =>
GetMessage(
"CL_" .
$ID .
"_AUTOTEST_DESC"),
313 "HOWTO" => ($howTo <>
'') ? (str_ireplace(
'#LANG#', LANG, $howTo)) :
"",
322 if (!$this->report_id)
327 CUserOptions::SetOption(
"checklist",
"autotest_start",
"Y",
true,
false);
336 $arCheckList = $this->checklist;
337 $currentState = $this->current_result;
338 foreach ($arCheckList[
"POINTS"] as $testID => $arTestFields)
340 if (!empty($currentState[$testID]))
342 $arCheckList[
"POINTS"][$testID][
"STATE"] = $currentState[$testID];
346 $arCheckList[
"POINTS"][$testID][
"STATE"] = [
359 $arPoint = $arPoints[$arTestID];
361 if (!$arPoint || $arPoint[
"AUTO"] !=
"Y")
365 if (isset($arPoints[$arTestID][
"PARAMS"]) && is_array($arPoints[$arTestID][
"PARAMS"]))
369 $arClass = $arPoint[
"CLASS_NAME"];
370 $arMethod = $arPoint[
"METHOD_NAME"];
372 if (!empty($arPoint[
"FILE_PATH"]) && file_exists(
$_SERVER[
"DOCUMENT_ROOT"] . $arPoint[
"FILE_PATH"]))
374 include(
$_SERVER[
"DOCUMENT_ROOT"] . $arPoint[
"FILE_PATH"]);
377 if (is_callable([$arClass, $arMethod]))
385 if (array_key_exists(
"STATUS",
$result))
388 if (
$result[
'STATUS'] ==
"true")
393 $arFields[
"COMMENTS"] = $arPoint[
"STATE"][
"COMMENTS"] ?? [];
395 if (isset(
$result[
"MESSAGE"][
"PREVIEW"]))
399 if (isset(
$result[
"MESSAGE"][
"DETAIL"]))
411 "ERROR" =>
$result[
"ERROR"] ??
null,
412 "SYSTEM_MESSAGE" =>
$arFields[
"COMMENTS"][
"SYSTEM"] ??
'',
420 "IN_PROGRESS" =>
"Y",
421 "PERCENT" =>
$result[
"PERCENT"],
433 function AddReport($arReportFields = [], $errorCheck =
false)
435 if ($this->report_id)
440 if ($errorCheck && !$arReportFields[
"TESTER"] && !$arReportFields[
"COMPANY_NAME"])
447 "TESTER" => $arReportFields[
"TESTER"],
448 "COMPANY_NAME" => $arReportFields[
"COMPANY_NAME"],
449 "PHONE" => $arReportFields[
"PHONE"],
450 "EMAIL" => $arReportFields[
"EMAIL"],
451 "PICTURE" => $arReportFields[
"PICTURE"],
452 "REPORT_COMMENT" => $arReportFields[
"COMMENT"],
453 "STATE" => $this->current_result,
454 "TOTAL" => $arStats[
"TOTAL"],
455 "SUCCESS" => $arStats[
"CHECK"],
456 "SUCCESS_R" => $arStats[
"CHECK_R"],
457 "FAILED" => $arStats[
"FAILED"],
458 "PENDING" => $arStats[
"WAITING"],
466 if (
$res = $dbres->Fetch())
469 CUserOptions::SetOption(
"checklist",
"autotest_start",
"N",
true,
false);
479 if ($this->report_id)
481 $checklist =
new CCheckList($this->report_id);
482 if ($checklist->current_result ==
false)
504 $arResult[
"POINTS"] = $checklist->GetPoints();
505 $arResult[
"INFO"] = $checklist->report_info;
529 $currentState =
false;
533 $db_result =
$DB->Query(
"SELECT ID FROM b_checklist WHERE REPORT <> 'Y'");
534 $currentState = $db_result->Fetch();
548 $strUpdate =
$DB->PrepareUpdate(
"b_checklist",
$arFields);
549 $strSql =
"UPDATE b_checklist SET " . $strUpdate .
" WHERE ID=" . $currentState[
"ID"];
553 $arInsert =
$DB->PrepareInsert(
"b_checklist",
$arFields);
554 $strSql =
"INSERT INTO b_checklist(" . $arInsert[0] .
", DATE_CREATE) " .
555 "VALUES(" . $arInsert[1] .
", '" . ConvertTimeStamp(time(),
"FULL") .
"')";
574 $arSqlFields = [
"ID",
"REPORT",
"HIDDEN",
"SENDED_TO_BITRIX"];
577 if (in_array(
$key, $arSqlFields))
579 $arSqlWhere[] =
$key .
"='" .
$DB->ForSql($value) .
"'";
585 $strSql =
"SELECT * FROM b_checklist";
586 if ($arSqlWhereStr <>
'')
588 $strSql .=
" WHERE " . $arSqlWhereStr;
590 $strSql .=
" ORDER BY ID desc";
601 $strUpdate =
$DB->PrepareUpdate(
"b_checklist",
$arFields);
604 "UPDATE b_checklist SET " . $strUpdate .
" WHERE ID = " .
$ID .
" ";
617 $strSql =
"DELETE FROM b_checklist where ID=" .
$ID;
631 $arComponentFolders = [
632 "/bitrix/components",
636 foreach ($arComponentFolders as $componentFolder)
638 if (file_exists(
$_SERVER[
'DOCUMENT_ROOT'] . $componentFolder) && (
$handle = opendir(
$_SERVER[
'DOCUMENT_ROOT'] . $componentFolder)))
640 while (($file = readdir(
$handle)) !==
false)
642 if ($file ==
"bitrix" || $file ==
".." || $file ==
".")
647 $dir = $componentFolder .
"/" . $file;
659 while (($subdir = readdir($comp_handle)) !==
false)
661 if ($subdir ==
".." || $subdir ==
"." || $subdir ==
".svn")
669 "path" =>
$dir .
"/" . $subdir,
670 "name" => $file .
":" . $subdir,
674 closedir($comp_handle);
683 foreach ($components as $component)
685 $arResult[
"MESSAGE"][
"DETAIL"] .= $component[
"name"] .
" \n";
688 if (
$arResult[
"MESSAGE"][
"DETAIL"] ==
'')
697 "PREVIEW" =>
GetMessage(
"CL_HAVE_CUSTOM_COMPONENTS") .
" (" .
count($components) .
")",
698 "DETAIL" =>
$arResult[
"MESSAGE"][
"DETAIL"],
705 foreach ($components as $component)
707 $desc =
$_SERVER[
'DOCUMENT_ROOT'] . $component[
"path"] .
"/.description.php";
708 if (!file_exists(
$desc) || filesize(
$desc) === 0)
710 $arResult[
"MESSAGE"][
"DETAIL"] .=
GetMessage(
"CL_EMPTY_DESCRIPTION") .
" " . $component[
"name"] .
" \n";
724 "PREVIEW" =>
GetMessage(
"CL_ERROR_FOUND_SHORT"),
725 "DETAIL" =>
$arResult[
"MESSAGE"][
"DETAIL"],
738 $bBitrixCloud = function_exists(
'openssl_encrypt') && CModule::IncludeModule(
'bitrixcloud') && CModule::IncludeModule(
'clouds');
746 foreach ($arTmpFiles as
$ar)
748 if (mb_strpos(
$ar[
'NAME'],
".enc.gz") || mb_strpos(
$ar[
'NAME'],
".tar.gz") || mb_strpos(
$ar[
'NAME'],
".tar") || mb_strpos(
$ar[
'NAME'],
".enc"))
759 foreach ($backup->listFiles() as
$ar)
761 if (mb_strpos(
$ar[
'FILE_NAME'],
".enc.gz") || mb_strpos(
$ar[
'FILE_NAME'],
".tar.gz") || mb_strpos(
$ar[
'FILE_NAME'],
".tar") || mb_strpos(
$ar[
'FILE_NAME'],
".enc"))
786 $_SERVER[
'DOCUMENT_ROOT'] .
"/bitrix/templates",
787 $_SERVER[
'DOCUMENT_ROOT'] .
"/local/templates",
791 $arRequireFiles = [
"header.php",
"footer.php"];
794 foreach ($arFolders as $folder)
796 if (file_exists($folder) && ($arTemplates = scandir($folder)))
798 foreach ($arTemplates as
$dir)
800 $arTemplateFolder = $folder .
"/" .
$dir;
805 $arRequireFilesTmp = $arRequireFiles;
807 foreach ($arRequireFilesTmp as
$k => $file)
809 if (!file_exists($arTemplateFolder .
"/" . $file))
811 $arMessage .=
GetMessage(
"NOT_FOUND_FILE", [
"#template#" =>
$dir,
"#file_name#" => $file]) .
"\n";
812 unset($arRequireFilesTmp[
$k]);
816 if (in_array(
"header.php", $arRequireFilesTmp))
818 if (file_exists($arTemplateFolder .
'/header.php'))
820 $header = file_get_contents($arTemplateFolder .
'/header.php');
824 preg_match(
'/\$APPLICATION->ShowHead\(/im', $header, $arShowHead);
825 preg_match(
'/\$APPLICATION->ShowTitle\(/im', $header, $arShowTitle);
826 preg_match(
'/\$APPLICATION->ShowPanel\(/im', $header, $arShowPanel);
827 if (!in_array(
$dir, [
'mail_join']) && empty($arShowHead))
829 preg_match_all(
'/\$APPLICATION->(ShowCSS|ShowHeadScripts|ShowHeadStrings)\(/im', $header, $arShowHead);
830 if (!$arShowHead[0] ||
count($arShowHead[0]) != 3)
832 $arMessage .=
GetMessage(
"NO_SHOWHEAD", [
"#template#" =>
$dir]) .
"\n";
835 if (!in_array(
$dir, [
'empty',
'mail_join']) && empty($arShowTitle))
837 $arMessage .=
GetMessage(
"NO_SHOWTITLE", [
"#template#" =>
$dir]) .
"\n";
839 if (!in_array(
$dir, [
'mobile_app',
'desktop_app',
'empty',
'learning_10_0_0',
'call_app',
'mail_join',
'dashboard_detail',
'booking_pub']) && empty($arShowPanel))
841 $arMessage .=
GetMessage(
"NO_SHOWPANEL", [
"#template#" =>
$dir]) .
"\n";
862 "PREVIEW" =>
GetMessage(
"TEMPLATE_CHECK_COUNT", [
"#count#" => $arCount]),
863 "DETAIL" => $arMessage,
874 $installFilesMapping = [
875 "install/components/bitrix/" =>
"/bitrix/components/bitrix/",
876 "install/js/" =>
"/bitrix/js/",
877 "install/activities/" =>
"/bitrix/activities/",
878 "install/admin/" =>
"/bitrix/admin/",
879 "install/wizards/" =>
"/bitrix/wizards/",
883 foreach ($events as
$event)
886 if (is_array($pathList))
888 foreach ($pathList as $pathFrom => $pathTo)
890 if (!array_key_exists($pathFrom, $installFilesMapping))
892 $installFilesMapping[$pathFrom] = $pathTo;
906 $rsInstalledModules = CModule::GetList();
907 while (
$ar = $rsInstalledModules->Fetch())
909 if (!mb_strpos(
$ar[
"ID"],
"."))
911 $NS[
"MLIST"][] =
$ar[
"ID"];
915 $NS[
"FILE_LIST"] = [];
916 $NS[
"FILES_COUNT"] = 0;
917 $NS[
"MODFILES_COUNT"] = 0;
922 $moduleFolder =
$_SERVER[
"DOCUMENT_ROOT"] .
"/bitrix/modules/" .
$moduleId .
"/";
923 $dbtype = mb_strtolower(
$DB->type);
925 $modifiedFileCount = 0;
940 if (empty(
$NS[
"FILE_LIST"]))
942 $sHost = COption::GetOptionString(
"main",
"update_site",
"www.1c-bitrix.ru");
943 $proxyAddr = COption::GetOptionString(
"main",
"update_site_proxy_addr",
"");
944 $proxyPort = COption::GetOptionString(
"main",
"update_site_proxy_port",
"");
945 $proxyUserName = COption::GetOptionString(
"main",
"update_site_proxy_user",
"");
946 $proxyPassword = COption::GetOptionString(
"main",
"update_site_proxy_pass",
"");
948 $http = new \Bitrix\Main\Web\HttpClient();
949 $http->setProxy($proxyAddr, $proxyPort, $proxyUserName, $proxyPassword);
951 $data = $http->get(
"https://" .
$sHost .
"/bitrix/updates/checksum.php?check_sum=Y&module_id=" .
$moduleId .
"&ver=" . $ver .
"&dbtype=" . $dbtype .
"&mode=2");
953 $result = unserialize(gzinflate(
$data), [
'allowed_classes' =>
false]);
958 $NS[
"MODULE_FILES_COUNT"] =
count(
$NS[
"FILE_LIST"]);
966 $timeout = COption::GetOptionString(
"main",
"update_load_timeout",
"30");
969 foreach (
$result as $file => $checksum)
971 $filePath = $moduleFolder . $file;
972 unset(
$NS[
"FILE_LIST"][$file]);
974 if (!file_exists($filePath))
980 if (md5_file($filePath) != $checksum)
982 $message .= str_replace([
"//",
"\\\\"], [
"/",
"\\"], $filePath) .
"\n";
983 $modifiedFileCount++;
986 foreach ($installFilesMapping as
$key => $value)
988 if (mb_strpos($file,
$key) === 0)
990 $filePath = str_replace(
$key,
$_SERVER[
"DOCUMENT_ROOT"] . $value, $file);
991 if (file_exists($filePath) && md5_file($filePath) != $checksum)
993 $modifiedFileCount++;
994 $message .= str_replace([
"//",
"\\\\"], [
"/",
"\\"], $filePath) .
"\n";
1015 if (
$result[
"error"] !=
"unknow module id")
1026 if (!empty($state[
"MESSAGE"]))
1035 if (!$arError && !$skip)
1037 if (empty(
$NS[
"FILE_LIST"]))
1048 $NS[
"FILES_COUNT"] += $fileCount;
1049 $NS[
"MODFILES_COUNT"] += $modifiedFileCount;
1051 if ((isset($state[
"STATUS"]) && $state[
"STATUS"] ===
false) || $arError ==
true || $skip)
1053 if ((isset($state[
"STATUS"]) && $state[
"STATUS"] ===
false) || $arError ==
true)
1055 $NS[
"STATUS"] =
false;
1057 $NS[
"FILE_LIST"] = [];
1058 $NS[
"MODULE_FILES_COUNT"] = 0;
1061 if ((
$NS[
"MNUM"] + 1) >= (
count(
$NS[
"MLIST"])) && empty(
$NS[
"LAST_FILE"]))
1063 $arDetailReport =
"";
1064 foreach (
$NS[
"MESSAGE"] as $module_message)
1066 $arDetailReport .=
"<div class=\"checklist-dot-line\"></div>" . $module_message;
1070 "PREVIEW" =>
GetMessage(
"CL_KERNEL_CHECK_FILES") .
$NS[
"FILES_COUNT"] .
"\n" .
1072 GetMessage(
"CL_KERNEL_CHECK_MODIFIED") .
$NS[
"MODFILES_COUNT"],
1073 "DETAIL" => $arDetailReport,
1075 "STATUS" => (
$NS[
"STATUS"] ===
false ?
false :
true),
1080 $percent = round((
$NS[
"MNUM"]) / (
count(
$NS[
"MLIST"]) * 0.01), 0);
1081 $module_percent = 0;
1082 if (
$NS[
"MODULE_FILES_COUNT"] > 0)
1084 $module_percent = (1 / (
count(
$NS[
"MLIST"]) * 0.01)) * (((
$NS[
"MODULE_FILES_COUNT"] -
count(
$NS[
"FILE_LIST"])) / (
$NS[
"MODULE_FILES_COUNT"] * 0.01)) * 0.01);
1086 $percent += $module_percent;
1088 "IN_PROGRESS" =>
"Y",
1089 "PERCENT" => number_format($percent, 2),
1091 if (empty(
$NS[
"FILE_LIST"]))
1094 $NS[
"MODULE_FILES_COUNT"] = 0;
1108 case "SECURITY_LEVEL":
1109 if (CModule::IncludeModule(
"security"))
1113 $arMessage .= (++$err) .
". " .
GetMessage(
"CL_FILTER_EXEPTION_FOUND") .
"\n";
1115 if (!CSecurityFilter::IsActive())
1117 $arMessage .= (++$err) .
". " .
GetMessage(
"CL_FILTER_NON_ACTIVE") .
"\n";
1119 if (COption::GetOptionString(
"main",
"captcha_registration",
"N") ==
"N")
1121 $arMessage .= (++$err) .
". " .
GetMessage(
"CL_CAPTCHA_NOT_USE") .
"\n";
1126 $arMessage .= (++$err) .
". " .
GetMessage(
"CL_ADMIN_SECURITY_LEVEL") .
"\n";
1128 if (COption::GetOptionInt(
"main",
"error_reporting", E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR | E_PARSE) != (E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR | E_PARSE) && COption::GetOptionString(
"main",
"error_reporting",
"") != 0)
1130 $arMessage .= (++$err) .
". " .
GetMessage(
"CL_ERROR_REPORTING_LEVEL") .
"\n";
1134 $arMessage .= (++$err) .
". " .
GetMessage(
"CL_DBDEBUG_TURN_ON") .
"\n";
1140 "PREVIEW" =>
GetMessage(
"CL_MIN_LEVEL_SECURITY"),
1141 "DETAIL" =>
GetMessage(
"CL_ERROR_FOUND") .
"\n" . $arMessage,
1148 "PREVIEW" =>
GetMessage(
"CL_LEVEL_SECURITY") .
"\n",
1157 "PREVIEW" =>
GetMessage(
"CL_SECURITY_MODULE_NOT_INSTALLED") .
"\n",
1162 case "ADMIN_POLICY":
1172 "PREVIEW" =>
GetMessage(
"CL_ADMIN_SECURITY_LEVEL_IS_HIGH") .
"\n",
1190 $arMessage .= (++$err) .
". " .
GetMessage(
"CL_DBDEBUG_TURN_ON") .
"\n";
1192 if (COption::GetOptionString(
"main",
"error_reporting",
"") != 0 && ini_get(
"display_errors"))
1194 $arMessage .= (++$err) .
". " .
GetMessage(
"CL_ERROR_REPORT_TURN_ON") .
"\n";
1201 "PREVIEW" =>
GetMessage(
"CL_ERROR_FOUND_SHORT") .
"\n",
1202 "DETAIL" => $arMessage,
1211 if (COption::GetOptionString(
"main",
"component_cache_on",
"Y") ==
"N")
1215 "PREVIEW" =>
GetMessage(
"CL_TURNOFF_AUTOCACHE") .
"\n",
1221 "PREVIEW" =>
GetMessage(
"CL_TURNON_AUTOCACHE") .
"\n",
1232 $sign =
",.#!*%$:-^@{}[]()'\"-+=<>?`&;";
1233 $dit =
"1234567890";
1243 $arMessage .=
GetMessage(
"CL_EMPTY_PASS") .
"\n";
1249 $arMessage .= (++$err) .
". " .
GetMessage(
"CL_SAME_REGISTER") .
"\n";
1252 for ($j = 0, $c = mb_strlen(
$password); $j < $c; $j++)
1258 if (mb_strpos($dit,
$password[$j]) !==
false)
1262 if ($have_dit ==
true && $have_sign ==
true)
1270 $arMessage .= (++$err) .
". " .
GetMessage(
"CL_HAVE_NO_DIT") .
"\n";
1274 $arMessage .= (++$err) .
". " .
GetMessage(
"CL_HAVE_NO_SIGN") .
"\n";
1278 $arMessage .= (++$err) .
". " .
GetMessage(
"CL_LEN_MIN") .
"\n";
1285 "PREVIEW" =>
GetMessage(
"CL_ERROR_FOUND_SHORT"),
1286 "DETAIL" => $arMessage,
1305 "PREVIEW" =>
GetMessage(
"CL_CHECK_PERFOM_NOT_INSTALLED"),
1315 if (COption::GetOptionString(
"perfmon",
"mark_php_is_good",
"N") ==
"N")
1319 "PREVIEW" =>
GetMessage(
"CL_PHP_NOT_OPTIMAL", [
"#LANG#" => LANG]) .
"\n",
1325 "PREVIEW" =>
GetMessage(
"CL_PHP_OPTIMAL") .
"\n",
1330 $arPerfIndex = COption::GetOptionString(
"perfmon",
"mark_php_page_rate",
"N");
1331 if ($arPerfIndex ==
"N")
1335 "PREVIEW" =>
GetMessage(
"CL_CHECK_PERFOM_FAILED", [
"#LANG#" => LANG]) .
"\n",
1338 elseif ($arPerfIndex < 15)
1342 "PREVIEW" =>
GetMessage(
"CL_CHECK_PERFOM_LOWER_OPTIMAL", [
"#LANG#" => LANG]) .
"\n",
1348 "PREVIEW" =>
GetMessage(
"CL_CHECK_PERFOM_PASSED") .
"\n",
1361 $_SERVER[
"DOCUMENT_ROOT"] .
"/bitrix/templates/",
1362 $_SERVER[
"DOCUMENT_ROOT"] .
"/bitrix/php_interface/",
1363 $_SERVER[
"DOCUMENT_ROOT"] .
"/bitrix/components/",
1366 "FOLDERS" => [
"images",
"bitrix",
"upload",
".svn"],
1369 $_SERVER[
"DOCUMENT_ROOT"] .
"/bitrix/php_interface/dbconn.php",
1370 "after_connect.php",
1384 foreach ($arPathTmp as
$path)
1392 foreach (
$arPath as $namespace)
1396 foreach (
$files as $file)
1409 if (
$content = file_get_contents($file))
1412 preg_match(
'/((?:mysql_query|mysqli_query|odbc_exec|oci_execute|odbc_execute)\(.*\))/ism',
$content, $queries);
1414 if ($queries && !empty($queries[0]))
1420 if (time() -
$time >= 20)
1424 "IN_PROGRESS" =>
"Y",
1435 "PREVIEW" =>
GetMessage(
"CL_KERNEL_CHECK_FILES") . $arFileNum .
".\n" .
GetMessage(
"CL_ERROR_FOUND_SHORT") .
"\n",
1442 "PREVIEW" =>
GetMessage(
"CL_KERNEL_CHECK_FILES") . $arFileNum .
"\n",
1452 $arUpdateList = CUpdateClient::GetUpdatesList(
$errorMessage, LANG);
1453 if (array_key_exists(
"CLIENT", $arUpdateList) && $arUpdateList[
"CLIENT"][0][
"@"][
"RESERVED"] ==
"N")
1457 "MESSAGE" => [
"PREVIEW" =>
GetMessage(
"CL_LICENSE_KEY_ACTIVATE")],
1462 $arResult[
"MESSAGE"] = [
"PREVIEW" =>
GetMessage(
"CL_LICENSE_KEY_NONE_ACTIVATE", [
"#LANG#" => LANG])];
1473 $ver = $vm->getVersion();
1477 if (version_compare($ver, $vm->getAvailableVersion()) >= 0)
1480 'PREVIEW' =>
GetMessage(
"CL_VMBITRIX_ACTUAL"),
1487 'PREVIEW' =>
GetMessage(
"CL_VMBITRIX_NOT_ACTUAL"),
1500 $checkerStatus = COption::GetOptionString(
'main',
'site_checker_success',
'N');
1501 if ($checkerStatus ==
'Y')
1505 'PREVIEW' =>
GetMessage(
"CL_SITECHECKER_OK", [
"#LANG#" => LANG]),
1511 'PREVIEW' =>
GetMessage(
"CL_SITECHECKER_NOT_OK", [
"#LANG#" => LANG]),
1534 'PREVIEW' =>
GetMessage(
"CL_SECURITYSCANNER_OLD", [
"#LANG#" => LANG]),
1537 elseif ($criticalResultsCount === 0)
1541 'PREVIEW' =>
GetMessage(
"CL_SECURITYSCANNER_OK"),
1547 'PREVIEW' =>
GetMessage(
"CL_SECURITYSCANNER_NOT_OK", [
"#LANG#" => LANG]),
1559 if (file_exists($pwd))
1561 $dir = scandir($pwd);
1562 foreach (
$dir as $file)
1564 if ($file ==
".." || $file ==
".")
1568 if (is_dir($pwd .
"$file"))
1570 if (!in_array($file, $arExept[
"FOLDERS"]))
1575 elseif (in_array(mb_substr(strrchr($file,
'.'), 1), $arExept[
"EXT"])
1576 && !in_array($pwd . $file, $arExept[
"FILES"])
1577 && !in_array($file, $arExept[
"FILES"])
1591 $policy = CUser::getPolicy(1);
1594 if ($policy->compare($preset))
1601 if ($policy->compare($preset))
static createByPreset($preset=self::PRESET_DEFAULT)
static includeModule($moduleName)
static getSourceEncoding($lang)
static getCurrentEncoding()
static needConvertEncoding($language, $targetEncoding=null)
static getVersion($moduleName)
static convertEncoding($data, $charsetFrom, $charsetTo)
static CheckKernel($arParams)
static CheckSecurityScannerStatus()
static CheckPerfomance($arParams)
static CheckQueryString($arParams=[])
static CheckSiteCheckerStatus()
static CheckCustomComponents($arParams)
static CheckErrorReport()
static CheckSecurity($arParams)
GetPoints($arSectionCode=false)
PointUpdate($arTestID, $arPointFields=[])
AutoCheck($arTestID, $arParams=[])
GetSectionStat($ID=false)
AddReport($arReportFields=[], $errorCheck=false)
static GetList($arOrder=[], $arFilter=[])
static Save($arFields=[])
static Update($ID, $arFields)
static isComponent($componentPath)
static getLastTestingInfo()
static calculateCriticalResults($pResults=array())
while($arParentIBlockProperty=$dbParentIBlockProperty->Fetch()) $errorMessage
$_SERVER["DOCUMENT_ROOT"]
GetDirList($path, &$arDirs, &$arFiles, $arFilter=array(), $sort=array(), $type="DF", $bLogical=false, $task_mode=false)
if(!defined('NOT_CHECK_PERMISSIONS')) $NS
ExecuteModuleEventEx($arEvent, $arParams=[])
IsModuleInstalled($module_id)
GetModuleEvents($MODULE_ID, $MESSAGE_ID, $bReturnArray=false)
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
GetMessage($name, $aReplace=null)
MakeTimeStamp($datetime, $format=false)
if(mb_strlen($order)< 6) $desc
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
if(empty($signedUserToken)) $key
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"