From bb784490e50dc324183ea40e98134432750ef1f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mu=C3=B1oz=20Garcia?= <73303506+danimu03@users.noreply.github.com> Date: Thu, 27 May 2021 12:21:41 +0200 Subject: [PATCH] debug --- panel_admin/includes/formAddFilm.php | 3 ++- panel_admin/includes/formAddPromotion.php | 3 ++- panel_admin/includes/formEditFilm.php | 3 ++- panel_admin/includes/formEditPromotion.php | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/panel_admin/includes/formAddFilm.php b/panel_admin/includes/formAddFilm.php index d5732af..f0fcc5a 100644 --- a/panel_admin/includes/formAddFilm.php +++ b/panel_admin/includes/formAddFilm.php @@ -48,7 +48,8 @@ class formAddFilm extends Form{ protected function procesaFormulario($datos){ $result = array(); - $tittle = $this->test_input($datos['tittle']) ?? null; + $t = $this->test_input($datos['tittle']) ?? null; + $tittle = str_replace(" ", "_", $t); //|| !mb_ereg_match(self::HTML5_EMAIL_REGEXP, $tittle) if ( empty($tittle) ) { $result['tittle'] = "El título no es válido"; diff --git a/panel_admin/includes/formAddPromotion.php b/panel_admin/includes/formAddPromotion.php index ff0e6e0..ea5ec37 100644 --- a/panel_admin/includes/formAddPromotion.php +++ b/panel_admin/includes/formAddPromotion.php @@ -48,7 +48,8 @@ class formAddPromotion extends Form{ protected function procesaFormulario($datos){ $result = array(); - $tittle = $this->test_input($datos['tittle']) ?? null; + $t = $this->test_input($datos['tittle']) ?? null; + $tittle = str_replace(" ", "_", $t); if ( empty($tittle) ) { $result['tittle'] = "El título no es válido"; diff --git a/panel_admin/includes/formEditFilm.php b/panel_admin/includes/formEditFilm.php index 752c044..0e2854b 100644 --- a/panel_admin/includes/formEditFilm.php +++ b/panel_admin/includes/formEditFilm.php @@ -60,7 +60,8 @@ class formEditFilm extends Form{ $result[] = "La pelicula seleccionada no existe."; } - $tittle = $this->test_input($datos['tittle']) ?? null; + $t = $this->test_input($datos['tittle']) ?? null; + $tittle = str_replace(" ", "_", $t); //|| !mb_ereg_match(self::HTML5_EMAIL_REGEXP, $tittle) if ( empty($tittle) ) { $result['tittle'] = "El título no es válido"; diff --git a/panel_admin/includes/formEditPromotion.php b/panel_admin/includes/formEditPromotion.php index 8ee75df..b195153 100644 --- a/panel_admin/includes/formEditPromotion.php +++ b/panel_admin/includes/formEditPromotion.php @@ -57,8 +57,8 @@ class formEditPromotion extends Form{ $result['id'] = "La promoción seleccionada no existe."; } - $tittle = $this->test_input($datos['tittle']) ?? null; - + $t = $this->test_input($datos['tittle']) ?? null; + $tittle = str_replace(" ", "_", $t); if ( empty($tittle) ) { $result['tittle'] = "El título no es válido"; }