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

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