[TYPO3-core] Extension dependencies of T3D exports

Karsten Dambekalns karsten at typo3.org
Mon Apr 3 16:36:24 CEST 2006


Hi.

On Monday 03 April 2006 14:53, Ingmar Schlecht wrote:
>  - It doesn't check wheter extensions are *loaded* but whether they are
>    *present on the server*. So impexp basically says "Everything's OK,
>    proceed to importing" even if the extensions are not loaded but
>    only available to be installed.

I stepped through this with a debugger, it actually *loads* them, the keys get 
added to extList in localconf.php. One issue I found is that after writing 
the new localconf.php this needs to be propagated to $TYPO3_LOADED_EXT...

 *QUESTION*
How this is done correctly is unclear to me. We have this in 
config_default.php, which I would reuse for my purpose:

 ---- snip ----
$TYPO3_LOADED_EXT = t3lib_extMgm::typo3_loadExtensions();
if ($TYPO3_LOADED_EXT['_CACHEFILE'])    {
	require(PATH_typo3conf.$TYPO3_LOADED_EXT['_CACHEFILE'].'_ext_localconf.php');
} else {
	$temp_TYPO3_LOADED_EXT = $TYPO3_LOADED_EXT;
	reset($temp_TYPO3_LOADED_EXT);
	while(list($_EXTKEY,$temp_lEDat)=each($temp_TYPO3_LOADED_EXT))  {
		if (is_array($temp_lEDat) && $temp_lEDat['ext_localconf.php'])  {
			$_EXTCONF = $TYPO3_CONF_VARS['EXT']['extConf'][$_EXTKEY];
			require($temp_lEDat['ext_localconf.php']);
		}
	}
}
 ---- snip ----

I would call this (adpated, of course) to refresh the variable in global 
scope - but what about the else-block? What happens to $_EXTCONF, which isn't 
used any further in config_default.php nor in index_ts.php afterwards? Do I 
need all that stuff, or is it safe to write this instead:

 ---- snip ----
$TYPO3_LOADED_EXT = t3lib_extMgm::typo3_loadExtensions();
if ($TYPO3_LOADED_EXT['_CACHEFILE'])    {
	require(PATH_typo3conf.$TYPO3_LOADED_EXT['_CACHEFILE'].'_ext_localconf.php');
} else {
	$TYPO3_LOADED_EXT = $TYPO3_LOADED_EXT;
}
 ---- snip ----

>  - If you click one of the "+" (=>install extension) icon, you get
>    thrown out of the process. Those "+" icons shouldn't be displayed at
>    all, because the user doesn't have to click the "+" but just the
>    submit button at the end of the page

True. It goes into dep-checking (which cannot act on eventual failures yet, so 
currently the needed extensions either should have no deps or be requested in 
the correct order), wich may become a problem later.

Currently the problem is that after importing it shows the "has been imported" 
message although it shouldn't, of course.

> Karsten, can you fix this before 17:30 (at that time Stucki and me want
> to start packaging rc3).

I'll try, but for this I need some help... see above.

Karsten
-- 
Karsten Dambekalns
TYPO3 Association - Active Member
http://association.typo3.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 309 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060403/a7cf4710/attachment.pgp 


More information about the TYPO3-team-core mailing list