Bug #19060 ยป bug_0008897.diff
/data/projekte/typo3_src/typo3_svn/t3lib/class.t3lib_tceforms_new.php 2008-07-03 16:36:58.138815931 +0200 | ||
---|---|---|
case 'FIELD':
|
||
$theFieldValue = $ffValueKey ? $row[$parts[1]][$ffValueKey] : $row[$parts[1]];
|
||
$tmpARR = explode(',',$theFieldValue);
|
||
if (is_array($tmpARR)) {
|
||
foreach ($tmpARR as $key => $value) {
|
||
$tmpArr2 = explode('|',$value);
|
||
$newFieldValue .= $tmpArr2[0].',';
|
||
}
|
||
$theFieldValue = t3lib_div::rm_endcomma($newFieldValue);
|
||
}
|
||
|
||
switch((string)$parts[2]) {
|
||
case 'REQ':
|
||
if (strtolower($parts[3])=='true') {
|
||
... | ... | |
break;
|
||
case 'IN':
|
||
case '!IN':
|
||
$output = t3lib_div::inList($parts[3],$theFieldValue);
|
||
$theFieldValueArr = explode(',',$theFieldValue);
|
||
$theReferenceValueArr = explode(',',$parts[3]);
|
||
$valueCount = count($theReferenceValueArr);
|
||
|
||
if (is_array($theFieldValueArr) && is_array($theReferenceValueArr) ) {
|
||
// all values must match
|
||
if ((count(array_intersect($theReferenceValueArr,$theFieldValueArr)) == $valueCount) && $parts[4] == 'ALL') {
|
||
$output = TRUE;
|
||
// just one value must match
|
||
} elseif ((count(array_intersect($theReferenceValueArr,$theFieldValueArr)) >0) && $parts[4] != 'ALL') {
|
||
$output = TRUE;
|
||
} else {
|
||
$output = FALSE;
|
||
}
|
||
} else {
|
||
$output = t3lib_div::inList($parts[3],$theFieldValue);
|
||
}
|
||
if ($parts[2]{0}=='!') $output = !$output;
|
||
break;
|
||
case '=':
|