You are here

googlenews.install in Google News sitemap 5

Same filename and directory in other branches
  1. 6 googlenews.install
  2. 7 googlenews.install

Install, update, and uninstall functions for the googlenews module.

File

googlenews.install
View source
<?php

/**
 * @file
 * Install, update, and uninstall functions for the googlenews module.
 */

/**
 * Implementation of googlenews_uninstall().
 */
function googlenews_uninstall() {
  variable_del('googlenews_node_types');
  variable_del('googlenews_category');
}

/**
 * Fix the googlenews_category variable.
 */
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;
}

Functions

Namesort descending Description
googlenews_uninstall Implementation of googlenews_uninstall().
googlenews_update_5000 Fix the googlenews_category variable.