domain_domainupdate

Versions
domain
domain_domainupdate($op, $domain, $form_state = array())

Implement hook_domainupdate()

Code

./domain.module, line 2102

<?php
function domain_domainupdate($op, $domain, $form_state = array()) {
  switch ($op) {
    case 'delete':
      if ($domain != -1) {
        // Remove domain-specific entries from the {node_access} table and clear the cache.
        db_query("DELETE FROM {node_access} WHERE realm = '%s' AND gid = %d", 'domain_id', $domain['domain_id']);
        db_query("DELETE FROM {domain_access} WHERE realm = '%s' AND gid = %d", 'domain_id', $domain['domain_id']);
        db_query("DELETE FROM {domain_editor} WHERE domain_id = %d", $domain['domain_id']);
      }
      break;
  }
  // In all cases, we need to force a menu rebuild, which also clears the cache.
  menu_rebuild();
}
?>

Contact

  • agentrickard [at] gmail [dot] com

Donations

My Amazon.com Wish List