Hooking into an update of the db system table Essentially I want to be able to monitor all updates to the db system table, by catching all updates to the db system table (for a particular theme's record). We have encountered some odd bugs whereby all themes are periodically (and apparently randomly) disabled, and I need to be able to log further information whenever this theme is disabled. What is the best way to approach this?

Alternatively is there a way to hook into the function for whenever a theme is enabled/disabled?
You should be able to use hook_themes_disabled().

The following code in a module will put themes being disabled into the Drupal logs:

function MYMODULE_themes_disabled($theme_list) {
  foreach ($theme_list as $key =&gt; $themename) {   
    watchdog('MYMODULE', '%themename was disabled.', array('%themename' =&gt; $themename), WATCHDOG_NOTICE);
  }
}


EDIT:  Forgot to mention this, but hook_themes_enabled() is used in exactly the same way, so you could easily just modify the hook above to check when a theme is enabled.