[TYPO3-dev] enableFields for eID functions

Sebastian Böttger sebastian.boettger at gmail.com
Wed Nov 7 09:58:27 CET 2007


Hi

I want to bring on top this discussion again, because again I run into a 
problem regarding this topic.

I used the extension commerce in an eID project (and I don't want to 
load all of the TSFE (loosing seconds) by using the page type approach).

There you find something lie this:

            if (is_object($GLOBALS['TSFE']) && 
is_object($GLOBALS['TSFE']->sys_page)) {
                $where="uid_product = $uid" .  
$GLOBALS['TSFE']->sys_page->enableFields('tx_commerce_articles', 
$GLOBALS['TSFE']->showHiddenRecords);
            }else{
                $where=" uid_product = $uid ";
            }

Indeed, you could also discuss if this is a bug itself, but there is no 
other possibility to to this.
What have I done:

I changed it to

            if (is_object($GLOBALS['TSFE']) && 
is_object($GLOBALS['TSFE']->sys_page)) {
                $where="uid_product = $uid" .  
$GLOBALS['TSFE']->sys_page->enableFields('tx_commerce_articles', 
$GLOBALS['TSFE']->showHiddenRecords);
            }else{

        $ignore = array('fe_group' => 1);
        $where = " uid_product = $uid ". 
t3lib_pageSelect::enableFields('tx_commerce_articles', '', $ignore);
            }

and loaded the TCA Array manually.
This works, but I had to change the extension code. Not nice.


Therefore I suggest to offer only ONE possibilty to use the enableFields 
(for the future), and making it possible to use this also without the TSFE.
For backward compatibility I suggest to offer a function in eidtools, 
which allows to load a very small TSFE object or the TCA Array of a 
needed table.


Best Regards
Sebastian Böttger




Nikolas Hagelstein schrieb:
> Hi,
>
> >From your point of view, why did i wrote :
>   
>> config.disableAllHeaderCode = 1
>>     
> To be honest: i just did not noticed it ;)
> bye,
> Nikolas
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev




More information about the TYPO3-dev mailing list