TODO: implement hook_domainupdate for domain_conf
nonsie - March 30, 2009 - 17:02
| Project: | Domain Access |
| Version: | 6.x-2.0-rc6 |
| Component: | - Domain Conf |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
HEAD is atm missing hook_domainupdate() in domain_conf to to enable deleting settings for domains. Once a domain is deleted its settings are still in domain conf table.

#1
Did I remove it accidentally?
#2
I think so - I can no longer find it.
#3
I don't have the tools to roll a patch atm but adding the following should do it:
/*** Implements hook_domainupdate()
*/
function domain_conf_domainupdate($op, $domain, $form_state = array()) {
if ($op == 'delete' && $domain['domain_id'] > 0) {
db_query("DELETE FROM {domain_conf} WHERE domain_id = %d", $domain['domain_id']);
cache_clear_all('variables', 'cache');
}
}
#4
Patch attached
#5
Committed to HEAD and to 5.x.
#6
Automatically closed -- issue fixed for 2 weeks with no activity.