- Модуль: imconnector
- Путь к файлу: ~/bitrix/modules/imconnector/lib/update/update200650.php
- Класс: BitrixImconnectorUpdateUpdate200650
- Вызов: Update200650::loadCurrentStatus
public function loadCurrentStatus()
{
$status = Option::get(self::$moduleId, self::OPTION_NAME, '');
$status = ($status !== '' ? @unserialize($status, ['allowed_classes' => false]) : []);
$status = (is_array($status) ? $status : []);
if (empty($status))
{
$count = 0;
$rawFile = FileTable::getList([
'select' => ['CNT'],
'filter' => ['MODULE_ID' => self::$moduleId],
'runtime' => [new ExpressionField('CNT', 'COUNT(*)')]
]);
if(
($rowFile = $rawFile->fetch()) &&
!empty($rowFile['CNT'])
)
{
$count = $rowFile['CNT'];
}
$status = [
'lastId' => 0,
'number' => 0,
'count' => $count,
];
}
return $status;
}