1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
deletetsparamagent.php
См. документацию.
1<?php
2
3namespace Bitrix\Im\Update;
4
5use Bitrix\Im\Model\MessageParamTable;
6use Bitrix\Main\Loader;
7
9{
10 protected static $moduleId = 'im';
11 private const LIMIT = 1000;
12
13 public static function deleteTsParamAgent()
14 {
15 if (!Loader::includeModule(self::$moduleId))
16 {
17 return '';
18 }
19
20 $paramIds = self::getParamIds();
21 if (empty($paramIds))
22 {
23 return '';
24 }
25
26 MessageParamTable::deleteBatch(['ID' => $paramIds]);
27
28 return __METHOD__ . '();';
29 }
30
31 private static function getParamIds(): array
32 {
33 if (Loader::includeModule('bitrix24'))
34 {
35 $limit = 100;
36 }
37
38 $result = MessageParamTable::query()
39 ->setSelect(['ID'])
40 ->where('PARAM_NAME', 'TS')
41 ->setLimit($limit ?? self::LIMIT)
42 ->fetchAll()
43 ;
44
45 if (empty($result))
46 {
47 return [];
48 }
49
50 return array_unique(array_map('intval', array_column($result, 'ID')));
51 }
52}
</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