CRatingsComponentsPhotogallery :: BeforeIndex: Bitrix method

      
<?php 
//  CRatingsComponentsPhotogallery :: BeforeIndex()
//  /dist/bitrix/modules/photogallery/classes/general/ratings_components.php:6

    
function BeforeIndex($arParams)
    {
        if ((
$arParams['MODULE_ID'] == 'iblock' || $arParams['MODULE_ID'] == 'socialnetwork') && $arParams['PARAM1'] == 'photos' && intval($arParams['PARAM2']) > && intval($arParams['ITEM_ID']) > 0)
        {
            
$arParams['ENTITY_TYPE_ID'] = 'IBLOCK_ELEMENT';
            
$arParams['ENTITY_ID'] = intval($arParams['ITEM_ID']);

            return 
$arParams;
        }
    }