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

Steffen Kamper info at sk-typo3.de
Thu Nov 6 13:08:09 CET 2008


Hi olly,

Oliver Hader schrieb:
> Hi Steffen,
> 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).
>

it isn't, it only unset the parser for one extension if initParser for 
this extension doesn't validate

// Init parser and if it returns false, unset its entry again:
if (!$this->external_parsers[$extension]->initParser($extension))	{
   unset($this->external_parsers[$extension]);
}

I'm not sure but i think crawler also use the external_parser, so it has 
to be available for FE and BE.


> 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)

reason here was that it is called from pi1 for rendering, that's why i 
used the TSFE. But now you introduced the constructor, so it's fine.

> + 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
> 
+1

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

I agree on all changes you did. I tested and it works fine. Thanks for 
your input :-)


vg Steffen


More information about the TYPO3-team-core mailing list