function BXIBlockAfterSave($arFields)
{
$it = new CIBlockElement;
preg_match('/\d{1,2}\.\d{1,2}\.(\d{4})/', $arFields['ACTIVE_FROM'], $match);
if (isset($match[1]))
{
$it->Update($arFields['ID'], array('DETAIL_PAGE_URL'=>'/news/'. $match[1] .'/?id='. $arFields['ID']) );
}
} |