1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
userstepper.php
См. документацию.
1
<?
2
namespace
Bitrix\Main\Update;
3
4
use Bitrix\Main\Localization\Loc;
5
use Bitrix\Main\Config\Option;
6
7
Loc::loadMessages(__FILE__);
8
9
final
class
UserStepper
extends
Stepper
10
{
11
const
OPTION_NAME
=
"main_index_user"
;
12
protected
static
$moduleId
=
"main"
;
13
17
public
function
execute
(
array
&
$result
)
18
{
19
$return =
false
;
20
21
$params
= Option::get(self::$moduleId, self::OPTION_NAME,
""
);
22
$params
= (
$params
!==
""
? @unserialize(
$params
, [
'allowed_classes'
=>
false
]) :
array
());
23
$params
= (is_array(
$params
) ?
$params
:
array
());
24
if
(empty(
$params
))
25
{
26
$params
=
array
(
27
"lastId"
=> 0,
28
"number"
=> 0,
29
"count"
=> \
Bitrix
\
Main
\
UserTable::getCount
(),
30
);
31
}
32
33
if
(
$params
[
"count"
] > 0)
34
{
35
$result
[
"title"
] = Loc::getMessage(
"MAIN_UPDATE_USER_INDEX"
);
36
$result
[
"progress"
] = 1;
37
$result
[
"steps"
] =
""
;
38
$result
[
"count"
] =
$params
[
"count"
];
39
40
$cursor =
\Bitrix\Main\UserTable::getList
(
array
(
41
'order'
=>
array
(
'ID'
=>
'ASC'
),
42
'filter'
=>
array
(
43
'>ID'
=>
$params
[
"lastId"
],
44
),
45
'select'
=>
array
(
'ID'
),
46
'offset'
=> 0,
47
'limit'
=> 100
48
));
49
50
$found =
false
;
51
while
($row = $cursor->fetch())
52
{
53
\Bitrix\Main\UserTable::indexRecord
($row[
'ID'
]);
54
55
$params
[
"lastId"
] = $row[
'ID'
];
56
$params
[
"number"
]++;
57
$found =
true
;
58
}
59
60
if
($found)
61
{
62
Option::set(self::$moduleId, self::OPTION_NAME, serialize(
$params
));
63
$return =
true
;
64
}
65
66
$result
[
"progress"
] = intval(
$params
[
"number"
] * 100/
$params
[
"count"
]);
67
$result
[
"steps"
] =
$params
[
"number"
];
68
69
if
($found ===
false
)
70
{
71
Option::delete(self::$moduleId,
array
(
"name"
=> self::OPTION_NAME));
72
}
73
}
74
return
$return;
75
}
76
}
77
?>
Bitrix\Main\ORM\Data\DataManager\getList
static getList(array $parameters=array())
Определения
datamanager.php:431
Bitrix\Main\ORM\Data\DataManager\getCount
static getCount($filter=array(), array $cache=array())
Определения
datamanager.php:516
Bitrix\Main\Update\Stepper
Определения
stepper.php:29
Bitrix\Main\Update\UserStepper
Определения
userstepper.php:10
Bitrix\Main\Update\UserStepper\execute
execute(array &$result)
Определения
userstepper.php:17
Bitrix\Main\Update\UserStepper\$moduleId
static $moduleId
Определения
userstepper.php:12
Bitrix\Main\Update\UserStepper\OPTION_NAME
const OPTION_NAME
Определения
userstepper.php:11
Bitrix\Main\UserTable\indexRecord
static indexRecord($id)
Определения
user.php:386
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$result
$result
Определения
get_property_values.php:14
Bitrix\Main
Bitrix
$params
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения
template.php:799
bitrix
modules
main
lib
update
userstepper.php
Создано системой
1.14.0