contao/core — pull request #5957 by discordier (2013-07-08 04:04:47+00:00)
Title: Use configured driver and allow third party drivers to handle ajax post actions

While working on DC_General using a custom data driver I ran into several problems and had to jump some hoops in current Contao 3.1 for ajax actions.

The problems result from:
1. Contao hard coded instantiating DC_Table or DC_File when there in fact is an entirely different driver specified in the DCA (in my case General).
2. Contao Ajax checking for existence of a database field when in fact the data sink configured in DC_General was not a Contao table and therefore threw an exception in the ajax class.

This pull request deals with those issues.
1. It creates an instance of the configured driver instead of DC_Table.
2. The `executePostActions` will only get evaluated when in fact using an driver delivered with Contao. If the dc is a third party driver the execute post actions HOOK will get fired, allowing the third party driver to handle the situation appropriately.

I am open to opinions on at least the HOOK part (the changes in Ajax.php) as I do not really know if I will break any custom driver (Isotope has some AFAIR) behavior using this approach but we definately need to address this fact, as the action names are hardwired into the widgets and therefore custom drivers will never be able to handle them otherwise.