From: Martín Marrese Date: Mon, 26 Jan 2004 15:08:18 +0000 (+0000) Subject: BugFix. Acomodo getValue para que funcione con los cambios nuevos. X-Git-Tag: svn_import~133 X-Git-Url: https://git.llucax.com/mecon/meconlib.git/commitdiff_plain/a3dc3e3d6c0f777348f144c144b3e26cb62f1833?ds=sidebyside BugFix. Acomodo getValue para que funcione con los cambios nuevos. --- diff --git a/lib/MECON/HTML/QuickForm/mdate.php b/lib/MECON/HTML/QuickForm/mdate.php index e454287..3c28d14 100644 --- a/lib/MECON/HTML/QuickForm/mdate.php +++ b/lib/MECON/HTML/QuickForm/mdate.php @@ -90,11 +90,11 @@ class MECON_HTML_QuickForm_mdate extends HTML_QuickForm_date { $date = parent::getValue(); - if ($date['Y']) { + if ($date['Y'][0]) { return new Date (@sprintf("%04d-%02d-%02d %02d:%02d:00", - $date['Y'], $date['F'], - $date['d'], $date['H'], - $date['i'])); + $date['Y'][0], $date['F'][0], + $date['d'][0], $date['H'][0], + $date['i'][0])); } else { return null; } @@ -110,7 +110,7 @@ class MECON_HTML_QuickForm_mdate extends HTML_QuickForm_date { * @return bool */ function validate($valor, $nombre, $formato = '') { - // Si viene completamente lleno, se valida con el paquete Validate. + // Si viene completamente lleno, se valida con el paquete Validate if ($valor['Y'] and $valor['d'] and $valor['F']) { $str = sprintf('%4d-%02d-%02d', $valor['Y'], $valor['F'], $valor['d']); return Validate::date($str, array('format' => '%Y-%m-%d'));