From afa317c9326a71269b15833109f88f32335ece35 Mon Sep 17 00:00:00 2001 From: Platonides Date: Tue, 22 May 2018 01:17:35 +0200 Subject: [PATCH] Undefined variable: D in wiki.php --- html/wiki.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/html/wiki.php b/html/wiki.php index f0a2fc2..796c7c5 100644 --- a/html/wiki.php +++ b/html/wiki.php @@ -21,9 +21,17 @@ function fecha ($F, $DI, $Extras = array ("Año")) { $R = date ("Y-m-d", $T); if (in_array ("Hora", $Extras)) $R .= date (", H:i", $T); } else { - if (in_array ("DíaSem", $Extras)) $D = (in_array ("Larga", $Extras) ? "{$DI["díasemc"][date ("N", $T)]}, " : "{$DI["díasem"][date ("N", $T)]} "); + if (in_array ("DíaSem", $Extras)) { + $D = (in_array ("Larga", $Extras) ? "{$DI["díasemc"][date ("N", $T)]}, " : "{$DI["díasem"][date ("N", $T)]} "); + } else { + $D = ""; + } $A = (in_array ("Año", $Extras) ? " Y" : ""); - if (in_array ("Hora", $Extras)) $H = ", H:i" . (in_array ("Larga", $Extras) ? " (e)" : ""); + if (in_array ("Hora", $Extras)) { + $H = ", H:i" . (in_array ("Larga", $Extras) ? " (e)" : ""); + } else { + $H = ""; + } $M = (in_array ("Larga", $Extras) ? "de " . $DI["mesc"][date ("n", $T)] . ($A ? " de" : "") : $DI["mes"][date ("n", $T)]); $R = $D . (date ("j ", $T) . $M . date ("{$A}{$H}", $T)); } -- 2.30.2