Bug #23877

Add DB structure update pre-processing hook in EM

Added by Xavier Perseguers almost 5 years ago. Updated almost 4 years ago.

Status:Resolved Start date:2010-10-30
Priority:Must have Due date:
Assigned To:Xavier Perseguers % Done:

100%

Category:- Spent time: -
Target version:4.5.6
TYPO3 Version:4.5 Is Regression:
PHP Version:5.2 Sprint Focus:
Complexity:

Description

Extension Manager lacks a way to perform actions prior to modify the database structure (create new tables or add additional fields in existing ones) when installing an extension.

This would be very handy for DBAL to let user update mapping definition from within TYPO3 without the need to first manually edit typo3conf/localconf.php.

Example of use:

(localconf.php of your extension):

$TYPO3_CONF_VARS['SC_OPTIONS']['typo3/mod/tools/em/index.php']['checkDBupdates'][] = t3lib_extMgm::extPath($_EXTKEY) . 'test.php:user_test';

(typo3conf/ext/your-ext/test.php)

class user_test implements em_index_checkDBupdatesHook {

public function preprocessDBupdates($extKey, array $extInfo, array $updateStatements, SC_mod_tools_em_index $parent) {
$output = '';
$options = t3lib_div::_GP('user_test');
if (is_array($options) && $options['foo'] == 1) {
// Perform some action
} else {
//t3lib_div::debug($updateStatements, 'statements');
// Show actions that should be performed
$output .= '<input type="checkbox" name="user_test[foo]" value="1" /> Pre-processing action';
}
return $output;
}
}

?>
(issue imported from #M16177)

16177.diff Magnifier (5.8 kB) Administrator Admin, 2010-10-30 08:47


Related issues

related to Core - Bug #23575: Allow DBAL to interact with EM to configure remapping Resolved 2010-09-21

Associated revisions

Revision 06c7af84
Added by Xavier Perseguers almost 4 years ago

[BUGFIX] Allow DBAL to interact with EM to configure remapping

Interface changed during Extension Manager refactoring.

Change-Id: I42e9ab7ed5513bdd031e186592b1768a7a00cedd
Fixes: #23575
Related: #23877
Releases: 4.5, 4.6

Revision 38f7ed45
Added by Xavier Perseguers almost 4 years ago

[BUGFIX] Allow DBAL to interact with EM to configure remapping

Interface changed during Extension Manager refactoring.

Change-Id: I5cb2f78e889f3abfce8e50aa7c455c79e52ad9ce
Fixes: #23575
Related: #23877
Releases: 4.5, 4.6

Revision 5fb43cda
Added by Xavier Perseguers almost 4 years ago

[BUGFIX] Add DB structure update pre-processing hook in EM

Extension Manager lacks a way to perform actions prior to modifying the database
structure (create new tables or add additional fields in existing ones) when
installing an extension.

This would be very handy for DBAL to let user update mapping definition from within
TYPO3 without the need to first manually edit typo3conf/localconf.php.

This is a bugfix as the feature had been accepted for 4.5.0beta1 and was wrongly
removed during Extension Manager refactoring task. In fact, the interface is still
here but never used.

Change-Id: I4de8490a6ad61f0068525fda07f41a8601be9c6c
Fixes: #23877
Releases: 4.5, 4.6
Reviewed-on: http://review.typo3.org/4614
Reviewed-by: Björn Pedersen
Reviewed-by: Philipp Gampe
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert

Revision a7d33af4
Added by Xavier Perseguers almost 4 years ago

[BUGFIX] Add DB structure update pre-processing hook in EM

Extension Manager lacks a way to perform actions prior to modifying the database
structure (create new tables or add additional fields in existing ones) when
installing an extension.

This would be very handy for DBAL to let user update mapping definition from within
TYPO3 without the need to first manually edit typo3conf/localconf.php.

This is a bugfix as the feature had been accepted for 4.5.0beta1 and was wrongly
removed during Extension Manager refactoring task. In fact, the interface is still
here but never used.

Change-Id: Ia7e7035193c3448333cecc268cc3f61479e6f13d
Fixes: #23877
Releases: 4.5, 4.6
Reviewed-on: http://review.typo3.org/4615
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers

History

#1 Updated by Xavier Perseguers almost 5 years ago

Committed to trunk as rev. 9241

#2 Updated by Xavier Perseguers almost 4 years ago

  • Status changed from Resolved to New
  • Priority changed from Should have to Must have
  • Target version deleted (0)

This feature has been removed between 4.5.0beta1 and 4.5.0 final during the Extension Manager refactoring.

#3 Updated by Xavier Perseguers almost 4 years ago

  • Tracker changed from Feature to Bug

Changed it as a bug as it is no more a feature ;)

#4 Updated by Mr. Hudson almost 4 years ago

Patch set 1 of change I4de8490a6ad61f0068525fda07f41a8601be9c6c has been pushed to the review server.
It is available at http://review.typo3.org/4614

#5 Updated by Mr. Hudson almost 4 years ago

Patch set 1 of change Ia7e7035193c3448333cecc268cc3f61479e6f13d has been pushed to the review server.
It is available at http://review.typo3.org/4615

#6 Updated by Xavier Perseguers almost 4 years ago

  • Status changed from New to Under Review

#7 Updated by Xavier Perseguers almost 4 years ago

  • Target version set to 4.5.6

#8 Updated by Xavier Perseguers almost 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF