You are here

function googlenews_update_5000 in Google News sitemap 5

Fix the googlenews_category variable.

File

./googlenews.install, line 19
Install, update, and uninstall functions for the googlenews module.

Code

function googlenews_update_5000() {
  $ret = array();
  $node_types = variable_get('googlenews_category', array());
  if (!empty($node_types['_gnall'])) {
    $node_types = array_keys(node_get_types('names'));
  }
  else {
    unset($node_types['_gnall']);
    $node_types = array_keys(array_filter($node_types));
  }
  variable_set('googlenews_node_types', $node_types);
  variable_del('googlenews_category');
  return $ret;
}