1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
domainua.php
См. документацию.
1<?php
2namespace Bitrix\Landing\Update\Block;
3
4use Bitrix\Landing\Internals\BlockTable;
5use Bitrix\Main\Config\Option;
6use Bitrix\Main\Localization\Loc;
7use Bitrix\Main\Update\Stepper;
8
9Loc::loadMessages(__FILE__);
10
11class DomainUa extends Stepper
12{
13 protected static $moduleId = 'landing';
14
20 public function execute(array &$result)
21 {
22 $lastId = Option::get('landing', 'update_block_domainua', 0);
23
24 if (!isset($result['steps']))
25 {
26 $result['steps'] = 0;
27 }
28
29 $finished = true;
30
31 // gets common quantity
32 $res = BlockTable::getList(array(
33 'select' => array(
35 'CNT', 'COUNT(*)'
36 )
37 ),
38 'filter' => [
39 'CONTENT' => '%cdn.bitrix24.ua%',
40 ]
41 ));
42 if ($row = $res->fetch())
43 {
44 $result['count'] = $row['CNT'];
45 }
46
47 // gets group for update
48 $res = BlockTable::getList(array(
49 'select' => array(
50 'ID', 'CONTENT'
51 ),
52 'filter' => array(
53 '>ID' => $lastId,
54 'CONTENT' => '%cdn.bitrix24.ua%',
55 ),
56 'order' => array(
57 'ID' => 'ASC'
58 ),
59 'limit' => 10
60 ));
61 while ($row = $res->fetch())
62 {
63 $lastId = $row['ID'];
64 $result['steps']++;
65
66 BlockTable::update($row['ID'], [
67 'CONTENT' => str_replace(
68 'cdn.bitrix24.ua',
69 'cdn.bitrix24.eu',
70 $row['CONTENT']
71 )
72 ]);
73
74 $finished = false;
75 }
76
77 // add files from blocks
78 if (!$finished)
79 {
80 Option::set('landing', 'update_block_domainua', $lastId);
81 return true;
82 }
83 else
84 {
85 Option::delete('landing', array('name' => 'update_block_domainua'));
86 return false;
87 }
88 }
89}
execute(array &$result)
Определения domainua.php:20
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
$res
Определения filter_act.php:7
$result
Определения get_property_values.php:14
Определения ufield.php:9