1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
forum.php
См. документацию.
1<?
3
6
8{
9 protected static $limit = 1;
10 protected static $moduleId = "forum";
11
12 public static function getTitle()
13 {
14 return Loc::getMessage("FORUM_STEPPER_TITLE");
15 }
16
17 public function execute(array &$option)
18 {
19 $option["steps"] = 1;
20 $option["count"] = 1;
21 if (self::do() > 0)
22 {
23 return self::FINISH_EXECUTION;
24 }
25 return self::CONTINUE_EXECUTION;
26 }
27
28 private static function do()
29 {
30 $limit = self::$limit;
32SELECT ID, ENTITY_ID
33FROM b_forum_service_statistic_queue
34WHERE ENTITY_TYPE='FORUM'
35ORDER BY ID ASC
36LIMIT {$limit}
37SQL
38 );
39
40 $last = null;
41 while ($res = $dbRes->fetch())
42 {
43 \Bitrix\Forum\Forum::getById($res["ENTITY_ID"])->calculateStatistic();
44 $last = $res;
45 }
46
47 if ($last)
48 {
49 Main\Application::getConnection()->queryExecute(<<<SQL
50DELETE FROM b_forum_service_statistic_queue WHERE ID >= {$last['ID']} AND ENTITY_TYPE='FORUM'
51SQL
52 );
53 }
54 return $limit;
55 }
56
57 public static function run(int $forumId)
58 {
59 Main\Application::getConnection()->queryExecute(<<<SQL
60INSERT IGNORE INTO b_forum_service_statistic_queue (ENTITY_TYPE, ENTITY_ID) VALUES ('FORUM', {$forumId});
61SQL
62 );
63 self::bind(0);
64 }
65}
static run(int $forumId)
Определения forum.php:57
execute(array &$option)
Определения forum.php:17
static $moduleId
Определения forum.php:10
static $limit
Определения forum.php:9
static getTitle()
Определения forum.php:12
static getConnection($name="")
Определения application.php:638
</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
Определения forum.php:2
$option
Определения options.php:1711
$dbRes
Определения yandex_detail.php:168