1
|
<?php
|
2
|
/**
|
3
|
* @file
|
4
|
* Contains install and update functions for advanced_help.
|
5
|
*/
|
6
|
|
7
|
/**
|
8
|
* Implements hook_uninstall().
|
9
|
*/
|
10
|
function advanced_help_uninstall() {
|
11
|
variable_del('advanced_help_last_cron');
|
12
|
$sam = variable_get('search_active_modules', NULL);
|
13
|
if (!empty($sam)) {
|
14
|
unset($sam['advanced_help']);
|
15
|
variable_set('search_active_modules', $sam);
|
16
|
}
|
17
|
}
|
18
|
|
19
|
/**
|
20
|
* Implements hook_schema().
|
21
|
*/
|
22
|
function advanced_help_schema() {
|
23
|
$schema['advanced_help_index'] = array(
|
24
|
'description' => 'Stores search index correlations for advanced help topics.',
|
25
|
'fields' => array(
|
26
|
'sid' => array(
|
27
|
'type' => 'serial',
|
28
|
'unsigned' => TRUE,
|
29
|
'not null' => TRUE,
|
30
|
'description' => 'The primary key to give to the search engine for this topic.',
|
31
|
'no export' => TRUE,
|
32
|
),
|
33
|
'module' => array(
|
34
|
'type' => 'varchar',
|
35
|
'length' => '255',
|
36
|
'default' => '',
|
37
|
'not null' => TRUE,
|
38
|
'description' => 'The module that owns this topic.',
|
39
|
),
|
40
|
'topic' => array(
|
41
|
'type' => 'varchar',
|
42
|
'length' => '255',
|
43
|
'default' => '',
|
44
|
'not null' => TRUE,
|
45
|
'description' => 'The topic id.',
|
46
|
),
|
47
|
'language' => array(
|
48
|
'type' => 'varchar',
|
49
|
'length' => 12,
|
50
|
'not null' => TRUE,
|
51
|
'default' => '',
|
52
|
'description' => 'The language this search index relates to.',
|
53
|
),
|
54
|
),
|
55
|
'primary key' => array('sid'),
|
56
|
'indexes' => array('language' => array('language')),
|
57
|
'foreign keys' => array(
|
58
|
'system' => array(
|
59
|
'table' => 'system',
|
60
|
'columns' => array('name' => 'name'),
|
61
|
),
|
62
|
),
|
63
|
);
|
64
|
|
65
|
return $schema;
|
66
|
}
|