[TYPO3-core] RFC #16177: Add DB structure update pre-processing hook in EM

Ernesto Baschny [cron IT] ernst at cron-it.de
Tue Nov 2 00:28:37 CET 2010


Xavier Perseguers schrieb am 31.10.2010 16:44:

>> I attached a screenshot as result of the hook implementation. This
>> screen is shown right _before_ the change in database structure are
>> proposed to the user. This lets him/her adjust DBAL mapping in
>> localconf.php from within TYPO3.
>>
>> This is already working code in DBAL (not yet committed) but I'd like to
>> have this in before I code it further (change in localconf.php and
>> suggestions for the remapped name) if for any reason this cannot be done
>> like that.
> 
> Please find enclosed v3 which takes care of hiding any "import static
> data" that should not be shown while the hook provides another form.
> 
> I now have a working patch for DBAL [1] which detects invalid
> table/field names, have a method to suggest a better naming (should
> still be enhanced), shows the form to the user and updates localconf.php
> with the mapping. Once the hook detects that all seems good (no more
> problem with table/field names), it lets EM works as usual, that is show
> tables to be created.

Hi Xavier,

took some versions to get it working, right? Was a bit difficult to
follow your monologue "thread", so I jumped right into v3 without
looking at previous attempts. I hope I didn't miss anything. ;)

I was annoyed by the CamelCase of the naming:

   em_index_checkDBupdatesHook
=> em_index_checkDatabaseUpdatesHook

   preprocessDBupdates
=> preProcessDatabaseUpdates

Until I figured that the name of the original method is checkDBupdates,
so I guess we will have to live with that interface name. :) Maybe you
could consider renaming the method of the interface thou?

Ok, then for testing with your test-recipe which I found in the bug
tracker (the code in the first mail of the thread was truncated).

+1 by reading and testing, hook looks fine.

Reading through your hook implementation in DBAL (v2 in #15755), I
suggest for you to propose a patch for the core's t3lib_install
"writeToLocalconf" to support multiple line configuration options as you
need them or maybe an easier API for that class.

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list