• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/lib/marketplace/client.php
  • Класс: BitrixRestMarketplaceClient
  • Вызов: Client::getNumUpdates
static function getNumUpdates()
{
	$appCodes = array();
	$dbApps = AppTable::getList(array(
		'filter' => array(
			"=ACTIVE" => AppTable::ACTIVE,
			"!=STATUS" => AppTable::STATUS_LOCAL,
		),
		'select' => array('CODE', 'VERSION')
	));
	while($app = $dbApps->fetch())
	{
		$appCodes[$app["CODE"]] = $app["VERSION"];
	}

	if(!empty($appCodes))
	{
		$updateList = static::getUpdates($appCodes);

		if (is_array($updateList) && isset($updateList['ITEMS']))
		{
			self::setAvailableUpdate($updateList['ITEMS']);
		}
		else
		{
			self::setAvailableUpdate();
		}
	}

	return __CLASS__."::getNumUpdates();";
}