Fixed bug #9994: ereg* is deprecated in PHP 5.3 alpha3
[Packages/TYPO3.CMS.git] / typo3 / sysext / dbal / class.ux_db_list_extra.php
index 680386f..2984c90 100755 (executable)
@@ -76,7 +76,7 @@ class ux_localRecordList extends localRecordList {
                                foreach($TCA[$table]['columns'] as $fieldName => $info) {
                                        if ($GLOBALS['TYPO3_DB']->cache_fieldType[$table][$fieldName]['metaType'] == 'B') {
                                                // skip, LIKE is not supported on BLOB columns...
-                                       } elseif ($info['config']['type']=='text' || ($info['config']['type']=='input' && !ereg('date|time|int',$info['config']['eval']))) {
+                                       } elseif ($info['config']['type']=='text' || ($info['config']['type']=='input' && !preg_match('/date|time|int/',$info['config']['eval']))) {
                                                $queryPart .= $or.$fieldName.' LIKE \'%'.$GLOBALS['TYPO3_DB']->quoteStr($this->searchString, $table).'%\'';
                                                $or = ' OR ';
                                        }
@@ -84,7 +84,7 @@ class ux_localRecordList extends localRecordList {
                        } else {
                                        // Traverse the configured columns and add all columns that can be searched
                                foreach($TCA[$table]['columns'] as $fieldName => $info) {
-                                       if ($info['config']['type']=='text' || ($info['config']['type']=='input' && !ereg('date|time|int',$info['config']['eval']))) {
+                                       if ($info['config']['type']=='text' || ($info['config']['type']=='input' && !preg_match('/date|time|int/',$info['config']['eval']))) {
                                                $sfields[]=$fieldName;
                                        }
                                }