You are here

vud.install in Vote Up/Down 7

Same filename and directory in other branches
  1. 6.3 vud.install
  2. 6.2 vud.install
  3. 7.2 vud.install

Install, update and uninstall functions for the Vote Up/Down core module.

File

vud.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the Vote Up/Down core module.
 */

/**
 * Implementation of hook_uninstall().
 */
function vud_uninstall() {
  variable_del('vud_tag');
  variable_del('vud_reset_vote');
}

/**
 * First update - Deprecate UpDown in favor of Vote Up/Down.
 */
function vud_update_6200() {
  $ret = array();
  $ret[] = update_sql("DELETE FROM {variable} WHERE name LIKE('updown%')");
  $ret[] = update_sql("UPDATE {votingapi_vote} SET tag = 'vote' WHERE tag LIKE('updown')");
  $ret[] = update_sql("UPDATE {votingapi_cache} SET tag = 'vote' WHERE tag LIKE('updown')");
  if (module_exists('updown')) {
    $ret[] = drupal_uninstall_schema('updown');
    drupal_uninstall_module('updown');
  }
  if (module_exists('updown_node')) {
    $ret[] = drupal_uninstall_schema('updown_node');
    drupal_uninstall_module('updown_node');
  }
  return $ret;
}

/**
 * Rebuild menu for 'votereset/%/%/%/%/%'.
 */
function vud_update_7000() {
  $result = array();
  menu_rebuild();
  return $result;
}

Functions

Namesort descending Description
vud_uninstall Implementation of hook_uninstall().
vud_update_6200 First update - Deprecate UpDown in favor of Vote Up/Down.
vud_update_7000 Rebuild menu for 'votereset/%/%/%/%/%'.