- Модуль: wiki
- Путь к файлу: ~/bitrix/modules/wiki/classes/general/wiki.php
- Класс: CWiki
- Вызов: CWiki::DeleteImage
function DeleteImage($IMAGE_ID, $ID, $IBLOCK_ID)
{
$rsProperties = CIBlockElement::GetProperty($IBLOCK_ID, $ID, 'value_id', 'asc', array('ACTIVE' => 'Y', 'CODE' => 'IMAGES'));
$_iPropertyId = 0;
while($arProperty = $rsProperties->Fetch())
{
if($arProperty['CODE'] == 'IMAGES' && $arProperty['VALUE'] == $IMAGE_ID)
{
$_iPropertyId = $arProperty['PROPERTY_VALUE_ID'];
break;
}
}
if (!empty($_iPropertyId))
{
$arPropertyValues = array();
$arPropertyValues[$_iPropertyId] = array('VALUE' => array('del' => 'Y'), 'DESCRIPTION' => '');
$this->cIB_E->SetPropertyValues($ID, $IBLOCK_ID, $arPropertyValues, 'IMAGES');
}
}