[BUGFIX] Allow Tx_ as class prefix
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_tcemain.php
index f8eba5f..66acb09 100644 (file)
@@ -2106,7 +2106,7 @@ class t3lib_TCEmain {
                                        }
                                break;
                                default:
-                                       if (substr($func, 0, 3) == 'tx_') {
+                                       if (t3lib_div::hasValidClassPrefix($func)) {
                                                $evalObj = t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func] . ':&' . $func);
                                                if (is_object($evalObj) && method_exists($evalObj, 'evaluateFieldValue')) {
                                                        $value = $evalObj->evaluateFieldValue($value, $is_in, $set);
@@ -2212,7 +2212,7 @@ class t3lib_TCEmain {
                                        $value = preg_replace('/[^a-zA-Z0-9_-]/', '', $value);
                                break;
                                default:
-                                       if (substr($func, 0, 3) == 'tx_') {
+                                       if (t3lib_div::hasValidClassPrefix($func)) {
                                                $evalObj = t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func] . ':&' . $func);
                                                if (is_object($evalObj) && method_exists($evalObj, 'evaluateFieldValue')) {
                                                        $value = $evalObj->evaluateFieldValue($value, $is_in, $set);
@@ -7238,4 +7238,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tcemain.php']);
 }
 
-?>
\ No newline at end of file
+?>