aspro:com.banners.max

В файле component.php вносим следующие изменения:
Code Copy code Code copied!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//Подключаем модуль
//Строка 11:
\Bitrix\Main\Loader::includeModule("modulemarket.translator");

//Все CIBlock::GetList меняем на FCIBlock::GetList
//Строка 110:
if(is_numeric($arParams["IBLOCK_ID"]))
{
   $rsIBlock = FCIBlock::GetList(array(), array(
      "ACTIVE" => "Y",
      "ID" => $arParams["IBLOCK_ID"],
   ));
}
else
{
   $rsIBlock = FCIBlock::GetList(array(), array(
      "ACTIVE" => "Y",
      "CODE" => $arParams["IBLOCK_ID"],
      "SITE_ID" => SITE_ID,
   ));
}

//Все CIBlockElement::GetList меняем на FCIBlockElement::GetList
//Строка 147:
if($arParams["BANNER_TYPE_THEME"])
{
   $arCode[] = $arParams["BANNER_TYPE_THEME"];
   if($arParams["BANNER_TYPE_THEME_CHILD"])
      $arCode[] = $arParams["BANNER_TYPE_THEME_CHILD"];
   if($arParams["BANNER_TYPE_THEME_CHILD2"])
      $arCode[] = $arParams["BANNER_TYPE_THEME_CHILD2"];

   $rsItem = FCIBlockElement::GetList(Array("SORT"=>"ASC", "ID" => "ASC"),  Array("IBLOCK_ID" => $arParams["TYPE_BANNERS_IBLOCK_ID"], "CODE" => $arCode), false, false, Array("IBLOCK_ID", "ID", "CODE"));
   while($arItem = $rsItem->Fetch())
      $arBannersCode[$arItem["CODE"]] = $arItem["ID"];
}

//Строка 201:
if( $arParams["NEWS_COUNT".$count] ) {
   $rsElement = FCIBlockElement::GetList($arSort, array_merge($arFilter, $arrFilter, $arFilter2, array("PROPERTY_TYPE_BANNERS.CODE" => $key)), false, array("nTopCount" => $arParams["NEWS_COUNT".$count]), $arSelect);
}

Количество показов: 258
Дата изменения: 21.08.2023 06:37:43