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

agentrickard - March 30, 2009 - 18:01
Category:feature request» task

Did I remove it accidentally?

#2

nonsie - March 30, 2009 - 18:04

I think so - I can no longer find it.

#3

nonsie - March 31, 2009 - 16:05

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

nonsie - April 6, 2009 - 16:29
Status:active» needs review

Patch attached

AttachmentSize
domain_conf.module_domainupdate.patch 1.23 KB

#5

agentrickard - April 6, 2009 - 18:05
Status:needs review» fixed

Committed to HEAD and to 5.x.

#6

System Message - April 20, 2009 - 18:10
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.