BUG 6521: this bug was fixed, we are remplacing all options mask to evaluate this to php

This commit is contained in:
Carlos Pacha
2011-03-24 15:30:49 -04:00
parent 76439283b9
commit c021a4ec7a

View File

@@ -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;
}