From 007c6f26ccc995fbb7be0ba4cce06481031e890c Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Tue, 15 Jan 2013 15:56:43 -0400 Subject: [PATCH] BUG 10327 PMDate Functions SOLVED - No rremplazaba correctamente los valores - Muestra el nombre del mes correctamente en espaniol cuando sel Sistema se encuentra en espaniol --- gulliver/system/class.g.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index 36346e17c..fc1781958 100644 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -1372,11 +1372,16 @@ class G //scape the literal switch ($lang) { case 'es': + $format = str_replace( ' del ', '[ofl]', $format ); $format = str_replace( ' de ', '[of]', $format ); break; } //first we must formatted the string + $format = str_replace( 'h', '{h}', $format ); + $format = str_replace( 'i', '{i}', $format ); + $format = str_replace( 's', '{s}', $format ); + $format = str_replace( 'yyyy', '{YEAR}', $format ); $format = str_replace( 'yy', '{year}', $format ); @@ -1387,10 +1392,6 @@ class G $format = str_replace( 'dd', '{DAY}', $format ); $format = str_replace( 'd', '{day}', $format ); - $format = str_replace( 'h', '{h}', $format ); - $format = str_replace( 'i', '{i}', $format ); - $format = str_replace( 's', '{s}', $format ); - if ($lang === '') { $lang = defined( SYS_LANG ) ? SYS_LANG : 'en'; } @@ -1437,6 +1438,7 @@ class G //recovering the original literal switch ($lang) { case 'es': + $ret = str_replace( '[ofl]', ' del ', $ret ); $ret = str_replace( '[of]', ' de ', $ret ); break; }