1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
check.php
См. документацию.
1<?php
3
4use \Bitrix\Main\Update\Stepper;
5use \Bitrix\Main\Config\Option;
6
7class Check extends Stepper
8{
13 protected static $moduleId = 'landing';
14
18 const STEPPER_COUNT = 1;
19
25 public function execute(array &$result)
26 {
27 $lastId = Option::get('landing', 'update_domain_check', 0);
28 $result['count'] = 0;
29 if (!isset($result['steps']))
30 {
31 $result['steps'] = 0;
32 }
33 $forUpdate = [];
34
35 // gets all domains by condition
36 $resDomain = \Bitrix\Landing\Domain::getList([
37 'select' => [
38 'ID', 'DOMAIN'
39 ],
40 'order' => [
41 'ID' => 'asc'
42 ]
43 ]);
44 while ($domain = $resDomain->fetch())
45 {
46 $resSite = \Bitrix\Landing\Site::getList([
47 'select' => [
48 'ID'
49 ],
50 'filter' => [
51 'DOMAIN_ID' => $domain['ID'],
52 'CHECK_PERMISSIONS' => 'N'
53 ]
54 ]);
55 if (!$resSite->fetch())
56 {
57 $result['count']++;
58 if ($domain['ID'] > $lastId)
59 {
60 if (count($forUpdate) < self::STEPPER_COUNT)
61 {
62 $forUpdate[$domain['ID']] = $domain['DOMAIN'];
63 }
64 }
65 }
66 }
67
68 if (!empty($forUpdate))
69 {
71 foreach ($forUpdate as $id => $domain)
72 {
73 $lastId = $id;
74 $result['steps']++;
75 \Bitrix\Landing\Domain::delete($id);
76 $class::deleteDomain($domain);
77 }
78 Option::set('landing', 'update_domain_check', $lastId);
79 return true;
80 }
81 else
82 {
83 Option::delete('landing', array('name' => 'update_domain_check'));
84 return false;
85 }
86 }
87
88}
static getExternalSiteController()
Определения manager.php:1379
execute(array &$result)
Определения check.php:25
const STEPPER_COUNT
Определения check.php:18
static $moduleId
Определения check.php:13
if(!\Bitrix\Main\Loader::includeModule('clouds')) $lastId
Определения sync.php:68
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14
</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."%"
Определения waybill.php:936