source: sipes/modules_contrib/cck/modules/number/number.install

stableversion-3.0
Last change on this file was dafc8d8, checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago

se actualizo el modulo

  • Propiedad mode establecida a 100755
File size: 1.2 KB
Línea 
1<?php
2
3/**
4 * @file
5 * Implementation of hook_install().
6 */
7function number_install() {
8  drupal_load('module', 'content');
9  content_notify('install', 'number');
10}
11
12/**
13 * Implementation of hook_uninstall().
14 */
15function number_uninstall() {
16  drupal_load('module', 'content');
17  content_notify('uninstall', 'number');
18}
19
20/**
21 * Implementation of hook_enable().
22 *
23 * Notify content module when this module is enabled.
24 */
25function number_enable() {
26  drupal_load('module', 'content');
27  content_notify('enable', 'number');
28}
29
30/**
31 * Implementation of hook_disable().
32 *
33 * Notify content module when this module is disabled.
34 */
35function number_disable() {
36  drupal_load('module', 'content');
37  content_notify('disable', 'number');
38}
39
40function number_update_last_removed() {
41  return 5;
42}
43
44/**
45 * Rename old decimal fields, which were really floats, to float
46 */
47function number_update_6000() {
48  if ($abort = content_check_update('number')) {
49    return $abort;
50  }
51
52  $ret = array();
53
54  drupal_load('module', 'content');
55  $ret[] = update_sql("UPDATE {". content_field_tablename() ."} SET type='number_float' WHERE type = 'number_decimal'");
56
57  content_clear_type_cache();
58  return $ret;
59}
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.