Skip to content
Extraits de code Groupes Projets
Valider 8eb41d42 rédigé par RealET's avatar RealET :kissing_cat:
Parcourir les fichiers

fix : depreciated en PHP 8.2

parent a851a470
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -684,7 +684,7 @@ function http_calendrier_ics($annee, $mois, $jour, $echelle, $partie_cal, $large ...@@ -684,7 +684,7 @@ function http_calendrier_ics($annee, $mois, $jour, $echelle, $partie_cal, $large
[$dimheure, $dimjour, $fontsize, $padding] = [$dimheure, $dimjour, $fontsize, $padding] =
calendrier_echelle($debut, $fin, $echelle); calendrier_echelle($debut, $fin, $echelle);
$size = sprintf('%0.2f', DEFAUT_TAILLE_HEURE + (10 / $echelle)); $size = sprintf('%0.2f', DEFAUT_TAILLE_HEURE + (10 / $echelle));
$style .= "height:${dimjour}px;font-size:${size}em;"; $style .= "height:{$dimjour}px;font-size:{$size}em;";
$date = date('Ymd', mktime(0, 0, 0, $mois, $jour, $annee)); $date = date('Ymd', mktime(0, 0, 0, $mois, $jour, $annee));
$avecheure = !isset($evt[1][$date]) ? '' : http_calendrier_ics_div($evt[1][$date], $date, $debut, $fin, $dimheure, $dimjour, $echelle, $largeur, $padding); $avecheure = !isset($evt[1][$date]) ? '' : http_calendrier_ics_div($evt[1][$date], $date, $debut, $fin, $dimheure, $dimjour, $echelle, $largeur, $padding);
...@@ -798,7 +798,7 @@ $lieu = ''; ...@@ -798,7 +798,7 @@ $lieu = '';
$width = $largeur - ($padding << 1) - DEFAUT_DECALE; $width = $largeur - ($padding << 1) - DEFAUT_DECALE;
$fontsize = sprintf('%0.2f', 1 + (10 / $echelle)); $fontsize = sprintf('%0.2f', 1 + (10 / $echelle));
$style = "z-index:${i};${spip_lang_left}:${decale}em;top:${haut}px;height:${hauteur}px;width:${width}px;font-size:${fontsize}em;padding:${padding}px;$bordure"; $style = "z-index:{$i};{$spip_lang_left}:{$decale}em;top:{$haut}px;height:{$hauteur}px;width:{$width}px;font-size:{$fontsize}em;padding:{$padding}px;$bordure";
$total .= "\n<div class='$colors calendrier-evt' style='$style' $total .= "\n<div class='$colors calendrier-evt' style='$style'
onmouseover=\"this.style.zIndex=" . $tous . '" onmouseover=\"this.style.zIndex=" . $tous . '"
onmouseout="this.style.zIndex=' . $i . '">' . onmouseout="this.style.zIndex=' . $i . '">' .
...@@ -825,11 +825,11 @@ function http_calendrier_ics_grille($debut, $fin, $dimheure, $dimjour, $echelle) ...@@ -825,11 +825,11 @@ function http_calendrier_ics_grille($debut, $fin, $dimheure, $dimjour, $echelle)
for ($i = $debut; $i < $fin; $i++) { for ($i = $debut; $i < $fin; $i++) {
$k = "$i:00"; $k = "$i:00";
$n = calendrier_top($k, $debut, $fin, $dimheure, $dimjour); $n = calendrier_top($k, $debut, $fin, $dimheure, $dimjour);
$total .= "\n<span style='$spip_lang_left:0;top:${n}px;'>$k</span>"; $total .= "\n<span style='$spip_lang_left:0;top:{$n}px;'>$k</span>";
for ($j = 1; $j < $slice; $j++) { for ($j = 1; $j < $slice; $j++) {
$k = $i . ':' . sprintf('%02d', floor(($j * 60) / $slice)); $k = $i . ':' . sprintf('%02d', floor(($j * 60) / $slice));
$n = calendrier_top($k, $debut, $fin, $dimheure, $dimjour); $n = calendrier_top($k, $debut, $fin, $dimheure, $dimjour);
$total .= "\n<span class='calendrier-jour-m' style='$spip_lang_left:0;top:${n}px;'>$k</span>"; $total .= "\n<span class='calendrier-jour-m' style='$spip_lang_left:0;top:{$n}px;'>$k</span>";
} }
} }
...@@ -839,8 +839,8 @@ function http_calendrier_ics_grille($debut, $fin, $dimheure, $dimjour, $echelle) ...@@ -839,8 +839,8 @@ function http_calendrier_ics_grille($debut, $fin, $dimheure, $dimjour, $echelle)
return "\n<span style='border:0;$spip_lang_left:0;top:2px;'>0:00</span>" . return "\n<span style='border:0;$spip_lang_left:0;top:2px;'>0:00</span>" .
$total . $total .
"\n<span style='$spip_lang_left:0;top:${n}px;'>$fin:00</span>" . "\n<span style='$spip_lang_left:0;top:{$n}px;'>$fin:00</span>" .
"\n<span style='border:0;$spip_lang_left:0;top:${c}px;'>23:59</span>"; "\n<span style='border:0;$spip_lang_left:0;top:{$c}px;'>23:59</span>";
} }
/// si la largeur le permet, les evenements sans duree, /// si la largeur le permet, les evenements sans duree,
...@@ -875,7 +875,7 @@ function http_calendrier_ics_trois($evt, $largeur, $dimjour, $echelle, $border) ...@@ -875,7 +875,7 @@ function http_calendrier_ics_trois($evt, $largeur, $dimjour, $echelle, $border)
$pos = 0; $pos = 0;
} }
return "\n<div style='position: relative; z-index: 2; top: ${pos}px; margin-$spip_lang_left: " . $largeur . "px'>$res</div>"; return "\n<div style='position: relative; z-index: 2; top: {$pos}px; margin-$spip_lang_left: " . $largeur . "px'>$res</div>";
} }
// https://code.spip.net/@http_calendrier_ics_titre // https://code.spip.net/@http_calendrier_ics_titre
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter