[TYPO3-core] RFC: Bug #7371: Query generator does not accept dates in where condition

Steffen Kamper steffen at sk-typo3.de
Mon Feb 4 02:28:57 CET 2008


"Oliver Hader" <oh at inpublica.de> schrieb im Newsbeitrag 
news:mailman.1.1202087434.4870.typo3-team-core at lists.netfielders.de...
> Hi Steffen,
>
> Steffen Kamper schrieb:
>> "Oliver Hader" <oh at inpublica.de> schrieb im Newsbeitrag 
>> news:mailman.1.1202084582.4870.typo3-team-core at lists.netfielders.de...
>>> This is a SVN patch request.
>>>
>>> Problem:
>>> In lowlevel / DB check / Full search, you can't set any value in the
>>> conditions of "date" and "datetime" fields. Every time you submit the
>>> form, the values are removed again.
>>> Additionally, the JS eval functions seem not to work.
>>>
>>> Solution:
>>> SVN rev. 1899 (4.1.0) introduced the file jsfunc.tbe_editor.js and
>>> changed the parts in the Core that were formerly hardcoded. In
>>> t3lib_queryGenerator the name of the HTML form object was addressed by
>>> document.forms[0] and not by a real name. Introducing some required
>>> methods to set the name of the form over the envolved instances to
>>> inform the JavaScript object 'TBE_EDITOR', solves this issue.
>>>
>>> Comments:
>>> Additionally, it should be mentioned that the whole module does not work
>>> anymore unless you fix line 633 of class.t3lib_fullsearch.php. Use type
>>> casting to make sure t3lib_div::_POST('SET') is an array:
>>> ...(array)t3lib_div::_POST('SET')...
>>>
>>> Bugtracker references:
>>> http://bugs.typo3.org/view.php?id=7371
>>>
>>> Branches: TYPO3_4-1 & Trunk
>>
>> i read it and it looks good. Reasons you mentioned are important for 
>> change.
>> just a question: why changed you singlequotes to doublequotes in JS-part?
>
> So, can I take it as a "+1"? Thank you! :)
>
yes

> Concerning the JS changes, we take a close look:
> - 
> $this->extJSCODE.='typo3form.fieldSet("'.$this->name.$subscript.'[inputValue]", 
> '.date.', "", 0,0);';
> + 
> $this->extJSCODE.='typo3form.fieldSet("'.$this->name.$subscript.'[inputValue]", 
> "date", "", 0,0);';
>
> The JS code starts with a single code and uses double quotes for strings 
> of the JS call. The part <'.date.'> was wrong since it was seen as PHP 
> var/constant/whatever and evaluated as string, e.g. like the following:
> <?php
> echo ''.date.'';
> ?>
>

ah ok, thx for explanation.

vg Steffen 




More information about the TYPO3-team-core mailing list