You are here

function domain_disable in Domain Access 5

Implement hook_disable()

File

./domain.module, line 1010
Core module functions for the Domain Access suite.

Code

function domain_disable() {
  domain_disabling(TRUE);

  // Rebuild the node access table.  Other modules have to fend for themselves here.
  node_access_rebuild();

  // If {node_access} just contains the 'all' grant, then reset it to default.
  $result = db_result(db_query("SELECT COUNT(realm) FROM {node_access} WHERE realm <> 'all'"));
  if ($result == 0) {
    db_query("DELETE FROM {node_access}");
    db_query("INSERT INTO {node_access} VALUES (0, 0, 'all', 1, 0, 0)");
  }
}