You are here

function domain_update_7311 in Domain Access 7.3

Remove stale domain_node_{bundle} variables.

File

./domain.install, line 435
Install file.

Code

function domain_update_7311(&$sandbox) {
  if (function_exists('node_type_get_types')) {
    $variable_names = array();
    foreach (node_type_get_types() as $key => $type) {
      $variable_names[] = 'domain_node_' . $key;
    }
    db_delete('variable')
      ->condition('name', 'domain_node_%', 'LIKE')
      ->condition('name', $variable_names, 'NOT IN')
      ->execute();
  }
}