source: sipes/modules_contrib/cck/modules/number/number.install @ 177a560

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

se agrego el directorio de modulos contribuidos de drupal

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