• Модуль: lists
  • Путь к файлу: ~/bitrix/modules/lists/classes/general/lists.php
  • Класс: CLists
  • Вызов: CLists::runRebuildSeachableContent
static function runRebuildSeachableContent($iblockId)
{
	$rebuildedData = Option::get("lists", "rebuild_seachable_content");
	$rebuildedData = unserialize($rebuildedData, ['allowed_classes' => false]);
	if(!is_array($rebuildedData))
		$rebuildedData = array();
	if(!isset($rebuildedData[$iblockId]))
	{
		return '';
	}

	$limit = 50;
	$offset = $rebuildedData[$iblockId];
	$rebuildedElementCount = CLists::rebuildSeachableContent($iblockId, $limit, $offset);

	if($rebuildedElementCount < $limit)
	{
		unset($rebuildedData[$iblockId]);
		Option::set("lists", "rebuild_seachable_content", serialize($rebuildedData));
		return '';
	}
	else
	{
		$rebuildedData[$iblockId] = $offset + $rebuildedElementCount;
		Option::set("lists", "rebuild_seachable_content", serialize($rebuildedData));
		return 'CLists::runRebuildSeachableContent('.$iblockId.');';
	}
}