You are here

number.install in Content Construction Kit (CCK) 6

Same filename and directory in other branches
  1. 6.3 modules/number/number.install
  2. 6.2 modules/number/number.install

File

modules/number/number.install
View source
<?php

// Updates happen in random order, whether or not the module is enabled,
// so include critical code here just to be sure.
include_once './' . drupal_get_path('module', 'content') . '/content.module';

/**
 * Implementation of hook_install().
 */
function number_install() {
  content_notify('install', 'number');
}

/**
 * Implementation of hook_uninstall().
 */
function number_uninstall() {
  content_notify('uninstall', 'number');
}

/**
 * Implementation of hook_enable().
 *
 * Notify content module when this module is enabled.
 */
function number_enable() {
  content_notify('enable', 'number');
}

/**
 * Implementation of hook_disable().
 *
 * Notify content module when this module is disabled.
 */
function number_disable() {
  content_notify('disable', 'number');
}
function number_update_last_removed() {
  return 5;
}

/**
 * Rename old decimal fields, which were really floats, to float
 */
function number_update_6000() {
  $ret = array();
  $ret[] = update_sql("UPDATE {" . content_field_tablename() . "} SET type='number_float' WHERE type = 'number_decimal'");
  content_clear_type_cache();
  return $ret;
}

Functions

Namesort descending Description
number_disable Implementation of hook_disable().
number_enable Implementation of hook_enable().
number_install Implementation of hook_install().
number_uninstall Implementation of hook_uninstall().
number_update_6000 Rename old decimal fields, which were really floats, to float
number_update_last_removed