[Typo3-dev] annoying difference between 3.5 and 3.6 extmng class extension warnings

Kasper Skårhøj kasper at typo3.com
Wed Mar 31 16:37:56 CEST 2004


Done.

- kasper

On Mon, 2004-03-22 at 16:49, Martin T. Kutschker wrote:
> Martin T. Kutschker wrote:
> > Martin T. Kutschker wrote:
> > 
> >> Hi!
> >>
> >> For 3.5 I used to write the class extension code like this (with 
> >> double quotes)
> >>
> >> if (defined("TYPO3_MODE") && 
> >> $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/gsi_whoisonline/pi1/class.tx_gsiwhoisonline_pi1.php"]) 
> >> {
> >>
> >> include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/gsi_whoisonline/pi1/class.tx_gsiwhoisonline_pi1.php"]); 
> >>
> >> }
> >>
> >> I had to, because otherwise I'd get warnings.
> >>
> >> Now in 3.6RC1 I have to use single quotes. That's great, but now I 
> >> have warnings for my old code. Perhaps both could be supported in 3.6 
> >> final? 
> > 
> > 
> > File: typo3/mod/tools/em/index.php
> > Line 2431:
> > 
> > Change from
> > 
> > $XclassParts = explode('if (defined(\'TYPO3_MODE\') && 
> > $TYPO3_CONF_VARS[TYPO3_MODE][\'XCLASS\']',$fContent,2);
> > if (count($XclassParts)==2)     {
> > 
> > to
> > 
> > if (ereg("\n\w*if *\( *defined\(['\"]TYPO3_MODE['\"]\) *&& 
> > *[$]TYPO3_CONF_VARS\[TYPO3_MODE\]\[['\"]XCLASS['\"]\]([^}]*)}",$fContent,$XclassParts))      
> > {
> 
> I goofed and forgot the other two comparisons:
> 
> 1)
> 
> The next reg.exp. in the code must read as follows.
> 
> ereg('^\[[\'"]([[:alnum:]_/.]+)[\'"]\]',$XclassParts[1],$reg);
> 
> 2)
> 
> The strstr() some lines down must be converted to an ereg() call.
> 
> ereg('include_once 
> *\([$]TYPO3_CONF_VARS\[TYPO3_MODE\]\[[\'"]XCLASS[\'"]\]\[[\'"]'.$cmpF.'[\'"]\]\);',$XclassParts[1])
> 
> Does anybody with CVS write access read and care about this?
> 
> Masi
> 
> _______________________________________________
> Typo3-dev mailing list
> Typo3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
-- 

Best regards

- kasper

---------------
"Zero MS-gravity" - finally migrated to Linux!






More information about the TYPO3-dev mailing list