Documentation

ChangeSite

void
CSearch::ChangePermission(
string MODULE_ID,
array arSite,
string ITEM_ID = false,
string PARAM1 = false,
string PARAM2 = false,
string SITE_ID = false
);

The method modifies the association of indexed data to sites. Static method.

Method parameters

Parameter Description
MODULE_ID Module code, which data access permissions must be modified.
arsite Associative array of association to sites. Keys - site IDs, and their values are paths to the indexed data.
ITEM_ID Code of the element, which access permissions must be modified. If this parameter equals false, then the limitation by the element code is not specified (access permissions for elements with any codes can be modified). Optional parameter, equals false by default.
PARAM1 First element parameter that limits the set of indexed elements, access permissions to which must be modified. If this parameter equals false, then the limitation for the first element parameter is not specified. Optional parameter, equals false by default.
PARAM2 Second element parameter that limits the set of indexed elements, access permissions to which must be modified. If this parameter equals false, then the limitation for the second element parameter is not specified. Optional parameter, equals false by default.
SITE_ID Indexed element site that limits the set of elements, access permissions to which must be modified. If this parameter equals false, the limitation for the element site is not specified. Optional parameter, equals false by default.

Examples of use

Modify paths to the indexed elements of information block with the identifier 5.
<?
$IBLOCK_ID = 5;
CSearch::ChangeSite("iblock", array("s1" => "=/new/localation/#ID#/"), false, $IBLOCK_ID);
?>


© «Bitrix24», 2001-2024
Up