You are here

vud.install in Vote Up/Down 6.2

Same filename and directory in other branches
  1. 6.3 vud.install
  2. 7.2 vud.install
  3. 7 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_install().
 */
function vud_install() {
  drupal_install_schema('vud');
}

/**
 * Implementation of hook_schema().
 */
function vud_schema() {
  return array();
}

/**
 * Implementation of hook_uninstall().
 */
function vud_uninstall() {
  drupal_uninstall_schema('vud');
  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 the path change on user statistics.
 */
function vud_update_6201() {
  $ret = array();
  menu_rebuild();
  return $ret;
}

Functions

Namesort descending Description
vud_install Implementation of hook_install().
vud_schema Implementation of hook_schema().
vud_uninstall Implementation of hook_uninstall().
vud_update_6200 First update - Deprecate UpDown in favor of Vote Up/Down.
vud_update_6201 Rebuild menu for the path change on user statistics.