From c021a4ec7a788daa9aec6be8e2ef482e5b6e824a Mon Sep 17 00:00:00 2001 From: Carlos Pacha Date: Thu, 24 Mar 2011 15:30:49 -0400 Subject: [PATCH] BUG 6521: this bug was fixed, we are remplacing all options mask to evaluate this to php --- gulliver/system/class.xmlform.php | 65 ++++++++++++++++--------------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php index bcc24961b..a0725a371 100644 --- a/gulliver/system/class.xmlform.php +++ b/gulliver/system/class.xmlform.php @@ -3267,27 +3267,27 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText // $navegador = get_browser(); // print($navegador); if($this->hint){ - function browsername($user_agent) { - $browsers = array( - 'Opera' => 'Opera', - 'Mozilla Firefox'=> '(Firebird)|(Firefox)', - 'Galeon' => 'Galeon', - 'Mozilla'=>'Gecko', - 'MyIE'=>'MyIE', - 'Lynx' => 'Lynx', - 'Netscape' => '(Mozilla/4\.75)|(Netscape6)|(Mozilla/4\.08)|(Mozilla/4\.5)|(Mozilla/4\.6)|(Mozilla/4\.79)', - 'Konqueror'=>'Konqueror', - 'Internet Explorer 7' => '(MSIE 7\.[0-9]+)', - 'Internet Explorer 6' => '(MSIE 6\.[0-9]+)', - 'Internet Explorer 5' => '(MSIE 5\.[0-9]+)', + function browsername($user_agent) { + $browsers = array( + 'Opera' => 'Opera', + 'Mozilla Firefox'=> '(Firebird)|(Firefox)', + 'Galeon' => 'Galeon', + 'Mozilla'=>'Gecko', + 'MyIE'=>'MyIE', + 'Lynx' => 'Lynx', + 'Netscape' => '(Mozilla/4\.75)|(Netscape6)|(Mozilla/4\.08)|(Mozilla/4\.5)|(Mozilla/4\.6)|(Mozilla/4\.79)', + 'Konqueror'=>'Konqueror', + 'Internet Explorer 7' => '(MSIE 7\.[0-9]+)', + 'Internet Explorer 6' => '(MSIE 6\.[0-9]+)', + 'Internet Explorer 5' => '(MSIE 5\.[0-9]+)', 'Internet Explorer 4' => '(MSIE 4\.[0-9]+)', - 'Internet Explorer 8' => '(MSIE 8\.[0-9]+)', - ); - foreach($browsers as $browser=>$pattern){ - if (eregi($pattern, $user_agent)) - return $browser; - } - return 'Unknow'; + 'Internet Explorer 8' => '(MSIE 8\.[0-9]+)', + ); + foreach($browsers as $browser=>$pattern){ + if (eregi($pattern, $user_agent)) + return $browser; + } + return 'Unknow'; } @@ -4332,20 +4332,21 @@ class XmlForm_Field_Image extends XmlForm_Field .' alt ="'.htmlentities($value,ENT_QUOTES,'utf-8').'"/>'; } } - - // function mask to php + //mask function to php function masktophp ($mask){ $tmp = str_replace("%", "", $mask); - if(preg_match('/b/',$tmp)) { - $tmp2 = str_replace("b", "M", $tmp); - $value=date($tmp2); - return $value; + if(preg_match('/b/',$tmp)) { + $tmp = str_replace("b", "M", $tmp); } - if(preg_match('/B/',$tmp)) { - $tmp2 = str_replace("B", "F", $tmp); - $value=date($tmp2); - return $value; + if(preg_match('/B/',$tmp)) { + $tmp = str_replace("B", "F", $tmp); } - $value = date($tmp); - return $value; + if(preg_match('/M/',$tmp)) { + $tmp = str_replace("M", "i", $tmp); + } + if(preg_match('/S/',$tmp)) { + $tmp = str_replace("S", "s", $tmp); + } + $value = date($tmp); + return $value; }