Project

General

Profile

Actions

Feature #16332

closed

Including ext_localconf.php of extensions NOT being installed

Added by Digital District about 18 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extension Manager
Target version:
-
Start date:
2006-07-09
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

When installing extensions, you can add form-fields for setting up some configuration (indexed_search and others use it). Now there is a hook to manipulate those field-contents before displaying. (It's about the detail-few including the setup-forms)

Problem-Situation:
If you have an extension where you want to manipulate those fields when displaying the first time, the extension is NOT installed, so ext_localconf.php is NOT included, and the hook-function is NOT called.

There is a patch attached, where ext_localconf.php is included if the extension is not installed. Problem is, that if it does include ext_localconf.php, that file might include content which is related to the installed extension, therefore it does not work.

So this is not the right way to go, as it only works in the few cases where this file is hardly containing any code, but the code for using the hooks.

I suggest some feature to add a hook in this case, which does work if the extension is not installed, but this is a rather very-low-level-feature request...

JH

Index: TYPO3/typo3_src-4.0/typo3/mod/tools/em/class.em_index.php ===================================================================
--- TYPO3/typo3_src-4.0/typo3/mod/tools/em/class.em_index.php (revision 143)
++ TYPO3/typo3_src-4.0/typo3/mod/tools/em/class.em_index.php (revision 160)
@ -4515,6 +4515,12 @
$arr = unserialize($TYPO3_CONF_VARS['EXT']['extConf'][$extKey]);
$arr = is_array($arr) ? $arr : array();

// Call processing function for constants config and data before write and form rendering:

+ // load ext_localconf.php for singleview of extension, if extension is not already installed:
+ if (!t3lib_extMgm::isLoaded($extKey)) {
+ echo ($absPath.'ext_localconf.php');
+ #require_once($absPath.'ext_localconf.php');
+ }

// Call processing function for constants config and data before write and form rendering:
if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/mod/tools/em/index.php']['tsStyleConfigForm'])) {
$_params = array('fields' => &$theConstants, 'data' => &$arr, 'extKey' => $extKey);

(issue imported from #M3814)

Actions #1

Updated by Christian Kuhn almost 13 years ago

  • Status changed from New to Resolved
  • Target version deleted (0)
  • PHP Version deleted (4)

This was solved differently: The em shows a message 'Additional configuration will be available once the extension is installed' or something like that and reloads the update view after install.

Actions #2

Updated by Benni Mack almost 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF