<commit_before><?php
use_helper('General', 'Field', 'Date');

if (count($associated_docs)):

$has_areas = (!isset($areas) || (isset($areas) && $areas));
if ($has_areas)
{
 ?>
<div class="one_kind_association">
<div class="association_content">
<?php
    $area_type_list = array_keys(sfConfig::get('app_areas_area_types'));
    array_shift($area_type_list);
    echo '<div class="assoc_img picto_'.$module.'" title="'.ucfirst(__($module)).'"><span>'.ucfirst(__($module)).__('&nbsp;:').'</span></div>';
    foreach ($area_type_list as $area_type)
    {
        $element = array();
        foreach ($associated_docs as $doc)
        {
            if ($doc['area_type'] != $area_type)
            {
                continue;
            }
            $doc_id = $doc['id'];
            $name = ucfirst($doc['name']);
            $url = "@document_by_id_lang_slug?module=$module&id=$doc_id" . '&lang=' . $doc['culture'] . '&slug=' . make_slug($doc['name']);
            $element[] = link_to($name, $url);
        }
        if (!empty($element))
        {
            echo '<div class="linked_elt">' . implode(', ', $element) . '</div>';
        }
    }
?>
</div>
</div>
<?php
}

$has_box = (isset($box) && $box);
$has_weather = (isset($weather) && $weather);
$has_avalanche_bulletin = (isset($avalanche_bulletin) && count($avalanche_bulletin));
$has_date = (isset($date) && $date);
if ($has_date)
{
    $date_1 = strtotime($date);
    $date_0 = $date_1 - 86400;
    $archive_month = date('n', $date_1);
    if ($archive_month > 5 && $archive_month < 10)
    {
        $has_date = false;
    }
}
else
{
    $date_1 = null;
}
if ($has_weather || $has_avalanche_bulletin)
{
    $has_coord = isset($lat) && $lat && isset($lon) && $lon;
    $weather_title_list = array();
    $weather_link_list = array();
    $avalanche_title_list = array();
    $avalanche_link_list = array();
    $avalanche_link_list_2 = array();
    $avalanche_archive_title_list = array();
    $avalanche_archive_0_link_list = array();
    $avalanche_archive_1_link_list = array();
    
    if ($has_weather && $has_coord)
    {
        $lang = $sf_user->getCulture();
        list($title, $link) = weather_coord_link($lat, $lon, $lang);
        if (!empty($link))
        {
            $weather_title_list[] = $title;
            $weather_link_list[] = $link;
        }
    }
    
    foreach ($associated_docs as $doc)
    {
        $doc_id = $doc['id'];
        $doc_name = ucfirst($doc['name']);
        
        if ($has_weather)
        {
            list($title, $link) = weather_link($doc_id, $doc_name);
            if (!empty($link))
            {
                $weather_title_list[] = $title;<commit_msg>ajout altitude dans les liens météo géoréférencés<commit_after><?php
use_helper('General', 'Field', 'Date');

if (count($associated_docs)):

$has_areas = (!isset($areas) || (isset($areas) && $areas));
if ($has_areas)
{
 ?>
<div class="one_kind_association">
<div class="association_content">
<?php
    $area_type_list = array_keys(sfConfig::get('app_areas_area_types'));
    array_shift($area_type_list);
    echo '<div class="assoc_img picto_'.$module.'" title="'.ucfirst(__($module)).'"><span>'.ucfirst(__($module)).__('&nbsp;:').'</span></div>';
    foreach ($area_type_list as $area_type)
    {
        $element = array();
        foreach ($associated_docs as $doc)
        {
            if ($doc['area_type'] != $area_type)
            {
                continue;
            }
            $doc_id = $doc['id'];
            $name = ucfirst($doc['name']);
            $url = "@document_by_id_lang_slug?module=$module&id=$doc_id" . '&lang=' . $doc['culture'] . '&slug=' . make_slug($doc['name']);
            $element[] = link_to($name, $url);
        }
        if (!empty($element))
        {
            echo '<div class="linked_elt">' . implode(', ', $element) . '</div>';
        }
    }
?>
</div>
</div>
<?php
}

$has_box = (isset($box) && $box);
$has_weather = (isset($weather) && $weather);
$has_avalanche_bulletin = (isset($avalanche_bulletin) && count($avalanche_bulletin));
$has_date = (isset($date) && $date);
if ($has_date)
{
    $date_1 = strtotime($date);
    $date_0 = $date_1 - 86400;
    $archive_month = date('n', $date_1);
    if ($archive_month > 5 && $archive_month < 10)
    {
        $has_date = false;
    }
}
else
{
    $date_1 = null;
}
if ($has_weather || $has_avalanche_bulletin)
{
    $has_coord = isset($lat) && $lat && isset($lon) && $lon && isset($elevation) && $elevation;
    $weather_title_list = array();
    $weather_link_list = array();
    $avalanche_title_list = array();
    $avalanche_link_list = array();
    $avalanche_link_list_2 = array();
    $avalanche_archive_title_list = array();
    $avalanche_archive_0_link_list = array();
    $avalanche_archive_1_link_list = array();
    
    if ($has_weather && $has_coord)
    {
        $lang = $sf_user->getCulture();
        list($title, $link) = weather_coord_link($lat, $lon, $elevation, $lang);
        if (!empty($link))
        {
            $weather_title_list[] = $title;
            $weather_link_list[] = $link;
        }
    }
    
    foreach ($associated_docs as $doc)
    {
        $doc_id = $doc['id'];
        $doc_name = ucfirst($doc['name']);
        
        if ($has_weather)
        {
            list($title, $link) = weather_link($doc_id, $doc_name);
            if (!empty($link))
            {
                $weather_title_list[] = $title;
{'fraction_non_alphanumeric': 0.1908439051296194, 'fraction_numerical': 0.0058834344548630265, 'mean_word_length': 2.804195804195804, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2647976', 'n_tokens_mistral': 1931, 'n_tokens_neox': 1892, 'n_words': 314}