stableversion-3.0
Last change
on this file since de78188 was
4f375e3,
checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago
|
se agrego el modulo panels
|
-
Propiedad mode establecida a
100644
|
File size:
1.5 KB
|
Línea | |
---|
1 | <?php |
---|
2 | |
---|
3 | /** |
---|
4 | * Implementation of hook_schema(). |
---|
5 | */ |
---|
6 | function panels_node_schema() { |
---|
7 | // This should always point to our 'current' schema. This makes it relatively easy |
---|
8 | // to keep a record of schema as we make changes to it. |
---|
9 | return panels_node_schema_1(); |
---|
10 | } |
---|
11 | |
---|
12 | /** |
---|
13 | * Schema version 1 for Panels in D6. |
---|
14 | */ |
---|
15 | function panels_node_schema_1() { |
---|
16 | $schema = array(); |
---|
17 | |
---|
18 | $schema['panels_node'] = array( |
---|
19 | 'fields' => array( |
---|
20 | 'nid' => array( |
---|
21 | 'type' => 'int', |
---|
22 | 'not null' => TRUE, |
---|
23 | 'default' => 0, |
---|
24 | ), |
---|
25 | 'css_id' => array( |
---|
26 | 'type' => 'varchar', |
---|
27 | 'length' => '255', |
---|
28 | ), |
---|
29 | 'did' => array( |
---|
30 | 'type' => 'int', |
---|
31 | 'not null' => TRUE, |
---|
32 | ), |
---|
33 | 'pipeline' => array( |
---|
34 | 'type' => 'varchar', |
---|
35 | 'length' => '255', |
---|
36 | ), |
---|
37 | ), |
---|
38 | 'primary key' => array('did'), |
---|
39 | ); |
---|
40 | |
---|
41 | return $schema; |
---|
42 | } |
---|
43 | |
---|
44 | /** |
---|
45 | * Implementation of hook_install(). |
---|
46 | */ |
---|
47 | function panels_node_install() { |
---|
48 | db_query("UPDATE {system} SET weight = 11 WHERE name = 'panels_node'"); |
---|
49 | drupal_install_schema('panels_node'); |
---|
50 | } |
---|
51 | |
---|
52 | /** |
---|
53 | * Implementation of hook_uninstall(). |
---|
54 | */ |
---|
55 | function panels_node_uninstall() { |
---|
56 | // TODO: Delete all actual nodes that are panels_nodes. |
---|
57 | db_query("DELETE FROM {node} WHERE type = 'panel'"); |
---|
58 | drupal_uninstall_schema('panels_node'); |
---|
59 | } |
---|
60 | |
---|
61 | /** |
---|
62 | * Implementation of hook_update to handle adding a pipeline |
---|
63 | */ |
---|
64 | function panels_node_update_6001() { |
---|
65 | $ret = array(); |
---|
66 | $field = array( |
---|
67 | 'type' => 'varchar', |
---|
68 | 'length' => '255', |
---|
69 | ); |
---|
70 | |
---|
71 | db_add_field($ret, 'panels_node', 'pipeline', $field); |
---|
72 | return $ret; |
---|
73 | } |
---|
Nota: Vea
TracBrowser
para ayuda de uso del navegador del repositorio.