Project

General

Profile

Bug #20513 ยป 11201_eval_email_v2.diff

Administrator Admin, 2009-05-27 14:46

View differences:

t3lib/class.t3lib_tcemain.php (working copy)
case 'alphanum_x':
$value = preg_replace('/[^a-zA-Z0-9_-]/','',$value);
break;
case 'email':
$set = t3lib_div::validEmail($value);
break;
default:
if (substr($func, 0, 3) == 'tx_') {
$evalObj = t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func].':&'.$func);
t3lib/jsfunc.evalfield.js (working copy)
this.parseInt = evalFunc_parseInt;
this.getNumChars = evalFunc_getNumChars;
this.parseDouble = evalFunc_parseDouble;
this.parseEmail = evalFunc_email;
this.noSpace = evalFunc_noSpace;
this.getSecs = evalFunc_getSecs;
this.getYear = evalFunc_getYear;
......
}
}
}
function evalFunc_email(value) {
var apos = value.indexOf("@");
var dotpos = value.lastIndexOf(".");
if (apos < 1 || dotpos - apos < 2) {
return '';
} else {
return value;
}
}
function evalFunc_input(type,inVal) {
if (type=="md5") {
return MD5(inVal);
......
if (type=="double2") {
return this.parseDouble(inVal);
}
if (type=="email") {
return this.parseEmail(inVal);
}
var today = new Date();
var add=0;
    (1-1/1)