[TYPO3-core] RFC: #5826: indexed_search: specify media types in advanced search

Oliver Hader oliver at typo3.org
Thu Nov 6 12:54:06 CET 2008


Hi Steffen,

Steffen Kamper schrieb:
> Hi,
> 
> Francois Suter schrieb:
>> Hi,
>>
>>> not making half things, i translated all hardcoded messages and all
>>> extensions.
>>
>> And this causes fatal errors! You are using the $GLOBALS['LANG'] in
>> the class tx_indexed_search_extparse, but this class is called in the
>> FE where $GLOBALS['LANG'] is not available.
>>
>> Can you please fix this?
> 
> i'm sorry about this. One thing i often forget, that FE behaves
> different when you are logged in BE (then no error occures)
> 
> I attached a fix for this as follow up.

I'm not sure if the external_parser is used in the back-end at all. I
just found a call to getIcon() that didn't use the language object. In
mod/index.php there's a instance of tx_indexedsearch_indexer which calls
initializeExternalParsers() - however this does not have any effect
since the instance gets thrown away one line late (at the end of the
function).

Concerning your patch:
* if it's really required (I'm not sure!) to have it in the back-end
please use "if (TYPO3_MODE == 'FE') { ... } else { ... }" (FE/BE
swapped) and put it to a new __construct() (see below for the reason)
* you have "$this->langObject" in your patch, which is fine but should
be "protected" in the class member declaration
* you're using "$this->langObject->sL" and additionally at some places
"$GLOBALS['TSFE']->sL" - IMO that's a bit confusing to have back-end and
front-end functionality mixed in one class (not your fault of course, it
was like that before)
+ that's the reason for introducing the __construct() to use
$this->langObject everywhere
* the new labels should be moved form ./pi/locallang.xml to
./locallang.xml if they could be used in back-end as well

And since I had the code open, I just did that... ;) Gimme your feedback
on the attached patch please.

olly
-- 
Oliver Hader
TYPO3 4.3 Release Manager
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005826_followup_v2.patch
Type: text/x-diff
Size: 17541 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20081106/6864c0d1/attachment.patch 


More information about the TYPO3-team-core mailing list