Bug #18643 ยป 0008161.patch
t3lib/class.t3lib_tsparser_ext.php (Arbeitskopie) | ||
---|---|---|
}
|
||
/**
|
||
* [Describe function...]
|
||
* Checks whether an entered constant value points again to a constant (which is not possible).
|
||
* Furthermore the name of the input field for entering the constant value is defined an the value is escaped.
|
||
*
|
||
* @param [type] $params: ...
|
||
* @return [type] ...
|
||
* @param array $params: Parameters of a constant
|
||
* @return array Indexed array with form name, escaped value and parameters ($params)
|
||
*/
|
||
function ext_fNandV($params) {
|
||
$fN='data['.$params['name'].']';
|
||
$fV=$params['value'];
|
||
if (ereg('^{[\$][a-zA-Z0-9\.]*}$',trim($fV),$reg)) { // Values entered from the constantsedit cannot be constants! 230502; removed \{ and set {
|
||
$fV='';
|
||
$name = 'data['.$params['name'].']';
|
||
$value = $params['value'];
|
||
// Entered values cannot reference to constants again:
|
||
if (preg_match('/^\{\$\w+(\.\w+)*\}$/', trim($value))) {
|
||
$value = '';
|
||
}
|
||
$fV=htmlspecialchars($fV);
|
||
return array($fN,$fV,$params);
|
||
$value = htmlspecialchars($value);
|
||
return array($name, $value, $params);
|
||
}
|
||
/**
|