[TYPO3-core] RFC: Fix #7657: Add hook to $TSFE->contentStrReplace()

Michael Stucki michael at typo3.org
Mon Feb 25 16:20:32 CET 2008


Oliver Hader wrote:

> Just two nits ;-)

Must be nits, yes :-)
(I just copied the hook from a different place and modified it as needed...)

> * Please use
> isset($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php'
['tslib_fe-contentStrReplace'])
> before the is_array() check of the same variable, or put it to a
> reference and make the term a bit shorter, e.g.
>    $contentStrReplaceHooks =&
> $this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php'
['tslib_fe-contentStrReplace'];

Added isset() and reference.

> * Is the key 'pObj' in the parameters array required
> (t3lib_div::callUserFunction() has '$this' too)?

Right, removed it. (Again, this was just copied without thinking :-))

> +1 on reading

For the rest, I have additionally added a test-hook to the indexed_search
extension. It will simply replace all occurences of "Search" with "Find".
Again: No caching is applied, and it only works if cacheHeaders are
disabled!

- michael
-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_7657_contentStrReplace_testhook.diff
Type: text/x-diff
Size: 1265 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080225/9265b84a/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_7657_contentStrReplace_v2.diff
Type: text/x-diff
Size: 2061 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080225/9265b84a/attachment-0001.diff 


More information about the TYPO3-team-core mailing list