diff --git a/local/ilsa_update.php b/local/ilsa_update.php index f69a52a..0af7761 100644 --- a/local/ilsa_update.php +++ b/local/ilsa_update.php @@ -2039,7 +2039,10 @@ while($sitemap_all_models_search_ob = $sitemap_all_models_search_res->GetNextEle $model = $sitemap_all_models_search_ob->GetFields(); $model['PROPERTIES'] = $sitemap_all_models_search_ob->GetProperties(); - array_push($sitemap_brands[$model['PROPERTY_BRAND_UID_VALUE']]['MODELS'], $model); + if($model['PROPERTIES']['REGIONS']['VALUE'] == "Да") + { + array_push($sitemap_brands[$model['PROPERTY_BRAND_UID_VALUE']]['MODELS'], $model); + } } $url = "https://".SITE_SERVER_NAME."/regions"; @@ -2087,13 +2090,16 @@ file_put_contents("/home/bitrix/www/sitemap.xml", $sitemap_index); /* sitemap regions file end -------------------------------------------------------------*/ -\Bitrix\Main\Mail\Event::send([ - "EVENT_NAME" => "ILSA_UPDATE", - "LID" => "s1", - "C_FIELDS" => Array( - "MESSAGE" => $traceback_message, - ) -]); +if(!in_array("debug", $argv)) +{ + \Bitrix\Main\Mail\Event::send([ + "EVENT_NAME" => "ILSA_UPDATE", + "LID" => "s1", + "C_FIELDS" => Array( + "MESSAGE" => $traceback_message, + ) + ]); +} die();