From 8f97f362ce72195b4a82de5f897c0e9386f404e6 Mon Sep 17 00:00:00 2001 From: Platonides Date: Tue, 22 May 2018 00:03:05 +0200 Subject: [PATCH] =?utf8?q?Valores=20por=20defecto=20para=20definir=20?= =?utf8?q?=C3=ADndices?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- html/inscripcion.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/html/inscripcion.php b/html/inscripcion.php index 4e308c8..652a55f 100755 --- a/html/inscripcion.php +++ b/html/inscripcion.php @@ -64,20 +64,20 @@ $DU = parsecfg ("jembot.usuarios"); $DT = parsecfg ("jembot.entidades"); $DE = parsecfg ("jembot.@{$E}"); $DI = parsecfg ("jembot.{$I}"); -$P = ($DE["proyecto"] ? $DE["proyecto"] : "{$I}wiki"); +$P = ($DE["proyecto"] ?? "{$I}wiki"); $DP = parsecfg ("jembot.{$P}"); -$Email = ($DE["contacto"] ? $DE["contacto"] : "info"); +$Email = ($DE["contacto"] ?? "info"); # "Fallback" de idiomas para cuando no tenemos definido alguno de los mensajes -if ($DI["idiomasec"]) { +if (!empty($DI["idiomasec"])) { $DS = parsecfg ("jembot.{$DI["idiomasec"]}"); $DI = array_merge ($DS, $DI); } -$Dur = ($DE["duración"] ? $DE["duración"] : 30); -if (($DE["cerrado"] || strtotime ("now") - strtotime ($DE["inicio"]) > $Dur * 24 * 3600) && $_GET["p"] != "-iespecial") { +$Dur = ($DE["duración"] ?? 30); +if ((!empty($DE["cerrado"]) || strtotime ("now") - strtotime ($DE["inicio"]) > $Dur * 24 * 3600) && isset($_GET["p"]) && $_GET["p"] != "-iespecial") { header ("location:/inscripcion/sincont.php?evento={$E}"); } @@ -113,7 +113,7 @@ $Sexo = (in_array ("Sexo", $Exigidos) ? "{$DI["sexo"]}" : $DI["sexo"]); $Edad = (in_array ("Edad", $Exigidos) ? "{$DI["edad"]}" : $DI["edad"]); $Cuenta = (in_array ("Cuenta", $Exigidos) ? "{$DI["nombreusr"]}" : $DI["nombreusr"]); -$Org = ($DE["organizador"] ? $DE["organizador"] : "wmes"); +$Org = ($DE["organizador"] ?? "wmes"); $Colab = array_merge ((array) $Org, (array) $DE["colaboradores"]); @@ -143,7 +143,7 @@ if ($_POST["Confirmado"] == "N") { # Datos enviados } } - $M = $_POST["Email"]; + $M = $_POST["Email"] ?? ""; if (! filter_var ($M, FILTER_VALIDATE_EMAIL) && ($M || ! $EmailOpc)) { $Error[] = $DI["errw"]["noemail"]; } @@ -309,14 +309,14 @@ if ($Org == "wmes") print ("

{$DI["asociadona"]}

"); print (""); $Img = ($_GET["i"] ?? $E); -$Web = ($DE["web"] ? $DE["web"] : wikiencode ("https://{$DP["web"]}/wiki/", $DE["página"][$P], NULL, NULL, NULL)); +$Web = ($DE["web"] ?? wikiencode ("https://{$DP["web"]}/wiki/", $DE["página"][$P], NULL, NULL, NULL)); foreach (array ("jpg", "png") as $Ext) { if (file_exists ("img/{$Img}.{$Ext}")) print (""); } ?>
La inscripción a este evento " . ($DE["abierto"] == "no" ? "no se encuentra abierta todavía. Puedes recibir más información {$DI["enviarmail"]}." : "se abrirá el {$DE["abierto"]}.")); } else { ?> @@ -419,7 +419,7 @@ if (count ($Grupos) > 1) { ?> \n"); for ($i = 1; $i < count ($Opciones); $i++) { -- 2.30.2