[BUGFIX] Allow Tx_ as class prefix
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_tceforms.php
index b6a7fef..c05d9b8 100644 (file)
@@ -1138,7 +1138,7 @@ class t3lib_TCEforms {
                                        }
                                break;
                                default:
-                                       if (substr($func, 0, 3) == 'tx_') {
+                                       if (t3lib_div::hasValidClassPrefix($func)) {
                                                        // Pair hook to the one in t3lib_TCEmain::checkValue_input_Eval()
                                                $evalObj = t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func] . ':&' . $func);
                                                if (is_object($evalObj) && method_exists($evalObj, 'deevaluateFieldValue')) {
@@ -1188,7 +1188,7 @@ class t3lib_TCEforms {
 
                        // going through all custom evaluations configured for this field
                foreach ($evalList as $evalData) {
-                       if (substr($evalData, 0, 3) == 'tx_') {
+                       if (t3lib_div::hasValidClassPrefix($evalData)) {
                                $evalObj = t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$evalData] . ':&' . $evalData);
                                if (is_object($evalObj) && method_exists($evalObj, 'returnFieldJS')) {
                                        $this->extJSCODE .= "\n\nfunction " . $evalData . "(value) {\n" . $evalObj->returnFieldJS() . "\n}\n";
@@ -1343,7 +1343,7 @@ class t3lib_TCEforms {
                                                        $this->registerRequiredProperty('field', $table . '_' . $row['uid'] . '_' . $field, $PA['itemFormElName']);
                                                break;
                                                default:
-                                                       if (substr($func, 0, 3) == 'tx_') {
+                                                       if (t3lib_div::hasValidClassPrefix($func)) {
                                                                        // Pair hook to the one in t3lib_TCEmain::checkValue_input_Eval() and t3lib_TCEmain::checkValue_text_Eval()
                                                                $evalObj = t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func] . ':&' . $func);
                                                                if (is_object($evalObj) && method_exists($evalObj, 'deevaluateFieldValue')) {
@@ -6554,4 +6554,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_tceforms.php']);
 }
 
-?>
\ No newline at end of file
+?>