-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnode_thumb.install
More file actions
41 lines (39 loc) · 1.02 KB
/
node_thumb.install
File metadata and controls
41 lines (39 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
function node_thumb_schema() {
$schema['node_thumbs'] = array(
'description' => 'Images related with nodes',
'fields' => array(
'nid' => array(
'description' => 'Node identificator.',
'type' => 'int',
'not null' => TRUE,
'default' => 0),
'image' => array(
'description' => 'Image name.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE)
),
'indexes' => array(
'node_id' => array('nid')
),
'unique keys' => array(
'nid' => array('nid')
),
'primary key' => array('nid')
);
return $schema;
}
function node_thumb_install() {
variable_set('node_thumbs_directory', '');
variable_set('node_thumbs_promoted', array());
variable_set('node_thumbs_nodes', array());
drupal_install_schema('node_thumb');
}
function node_thumb_uninstall() {
variable_del('node_thumbs_directory');
variable_del('node_thumbs_promoted');
variable_del('node_thumbs_nodes');
drupal_uninstall_schema('node_thumb');
}
?>