[TYPO3-core] RFC #15001: Bugfix: It is not possible to search for '%' or '_' inside the Backend

caspar at gosign.de caspar at gosign.de
Tue Jul 13 02:58:45 CEST 2010


Hi,

> On 05.07.2010 00:46, caspar at gosign.de wrote:
>> This is an SVN patch request.
>>
>> Type: Performance
>>
>> Bugtracker references:
>> http://bugs.typo3.org/view.php?id=15001
>>
>> Branches:
>> TYPO3_4-2, TYPO3_4-3, TYPO3_4-4, Trunk
>>
>> Problem:
>> Neither with the search-button in the Backend-Toolbar, nor within the
>> Admin-Tool 'DB check' with the 'full search' function, it is possible to
>> search for the chars '%' and '_'.
>> Both functions does not escape the named chars for using inside the
>> like-query, so they are interpreted as wildcards by sql.
>> Additionally the Toolbar-search does not use the function
>> t3lib_db->searchQuery, which should be used for dbal support.
>>
>> Solution:
>> adding t3lib_db->escapeStrForLike into t3lib_db->searchQuery
>> using t3lib_db->searchQuery inside the Toolbar-search
>> (class.db_list.inc)
>
> In general +1, but: with the patch like it is now, we get different
> behaviors for dbal and the core, because it seems as if dbal xclasses
> the localrecordlist class and overwrites the "makeSearchString" function.
>
> Xavier, do you think it's possible to apply the same changes to DBAL so
> we get consistent behavior?

If I'm right, the dbal is xclassing the localrecordlist just because of
the fact that the "makeSearchString" function does not uses
t3lib_db->searchQuery. To be consistent we should add the searchQuery
function to the dbal xclass of t3lib_db and remove the xclass of
localrecordlist.

In the path v2 I moved all dbal-related stuff to the class ux_t3lib_db, so
the xclass of localrecordlist should be deleted. I also made some code
cleaning.

@Xavier: I'm sorry, but I don't know how tell my email web client to send
this attachment as type text/plain :-(

Caspar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_15001_v2.diff
Type: application/octet-stream
Size: 6248 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100713/d707de29/attachment.obj>


More information about the TYPO3-team-core mailing list