/
Temporary table handler refactoring

Temporary table handler refactoring

In-Portal has a safe measure, implemented in Admin Console, that ensures data integrity while administrator is adding/editing data. This feature is called "temporary tables" or simply "temp tables" (not related to same term in MySQL).

How it works:

  1. administrator selects some records for editing
  2. an empty table (temp table) is created, with a structure matching one, where data resides
  3. all data related to records being edited is copied into new temp table
  4. administrator can change data anyway he wants, but until he hits "Save" button website visitors won't see a change
  5. administrators hits "Save" button and data from temp table replaces data in live table (only records being edited)
  6. temp table is deleted

Class kTempTablesHandler make editing with usage of temporary tables possible. This class is pretty old and wasn't modified a lot since it's creation due it's complexity.

I've decided to refactor this class to make it easier to read and modify in future.

temp_handler_refactoring.patch

Error rendering macro 'jira' : Unable to locate Jira server for this macro. It may be due to Application Link configuration.