Project

General

Profile

Bug #40347

Updated by Daniel Goerz almost 9 years ago

I have in a Sysfolder own data from a own extension. 
 I have set the searchField in TCA-Confuguration (ext_tables.php) 
 There is a inputfield: 
 <pre> 
 'xxxx_id' 

 _'xxxx_id' => array( 
	 'exclude' => 1, 
	 'label' => '......................', 
	 'config' => array( 
		 'type' => 'input', 
		 'size' => '45', 
		 'eval' => 'tx_.....datenbank..._id,required', 
		 ) 
 ), 
 </pre> 
	 ),_ 

 The format of this field ist xxxx.xxxxx.xxxx (example: 1245.01024.0068, 1245.01554.0678, 2265.01824.2268, ...). 
 When i search for '1245' I find no results. 
 For searchstring '1245.', i find all data (starts with 1245). 

 The Problem is in file typo3/class.db_list.inc line 555. 

 <pre> 
 if (t3lib_utility_Math::canBeInterpretedAsInteger($this->searchString)) _if (t3lib_utility_Math::canBeInterpretedAsInteger($this->searchString))_ { 
 </pre> 
 

 My searchstring was interpreted as integer and the function makeSearchString returns only 
 <pre> 
 AND  

 _AND uid = 1245 
 </pre> 1245_ 

 The second problem in this function is in lines 592-594. 

 <pre> 
 if _if ($fieldConfig['type'] == 'text' || 
		 $fieldConfig['type'] == 'flex' || 
		 ($fieldConfig['type'] == 'input' && (!$fieldConfig['eval'] || !preg_match('/date|time|int/',$fieldConfig['eval'])))) { 
	 $whereParts[] = sprintf($format, $fieldName, $like); 
 } 
 </pre> 

 }_ 


 I have a user function in eval. The name of this function is 'tx_.....datenbank..._id'. 
 The condition 

 <pre> 
 '!preg_match('/date|time|int/',$fieldConfig['eval'])' 
 </pre> 

 _'!preg_match('/date|time|int/',$fieldConfig['eval'])'_  

 find string 'date' in this name, and so fails including this field in the querystring. 

Back