forked from harshalqed42/lexicon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlexicon.install
More file actions
96 lines (88 loc) · 3.77 KB
/
Copy pathlexicon.install
File metadata and controls
96 lines (88 loc) · 3.77 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php
/**
* @file
* Install, update and uninstall functions for the Lexicon module.
*/
/**
* Implements hook_requirements().
*/
function lexicon_requirements($phase) {
// $requirements = array();
// // Ensure translations don't break at install time.
// $t = get_t();
// // Check that php is compiled with ctype support.
// $requirements['ctype'] = array(
// 'title' => $t('Character type functions (ctype)'),
// );
// if (function_exists('ctype_alnum')) {
// $requirements['ctype']['value'] = $t('Enabled');
// $requirements['ctype']['severity'] = REQUIREMENT_OK;
// }
// else {
// $requirements['ctype']['value'] = $t('Disabled');
// $requirements['ctype']['description'] = $t('The Lexicon module requires that you configure PHP with --enable-ctype.');
// $requirements['ctype']['severity'] = REQUIREMENT_ERROR;
// }
// return $requirements;
}
/**
* Implements hook_uninstall().
* There are no tables, so we delete all variables and clear the filter cache.
* It is left to the user to remove any vocabularies that are no longer needed.
*/
function lexicon_uninstall() {
// $vids = variable_get('lexicon_vids', array());
// // Delete the settings for each Lexicon vocabulary.
// foreach ($vids as $vid) {
// variable_del('lexicon_path_' . $vid);
// variable_del('lexicon_title_' . $vid);
// variable_del('lexicon_introduction_' . $vid);
// variable_del('lexicon_related_terms_field_' . $vid);
// variable_del('lexicon_synonyms_field_' . $vid);
// variable_del('lexicon_image_field_' . $vid);
// }
// // Delete the rest of the variables.
// variable_del('lexicon_vids');
// variable_del('lexicon_disable_indicator');
// variable_del('lexicon_click_option');
// variable_del('lexicon_show_edit');
// variable_del('lexicon_show_search');
// variable_del('lexicon_go_to_top_link');
// variable_del('lexicon_go_to_top_link_fragment');
// variable_del('lexicon_local_links_scroll');
// variable_del('lexicon_page_per_letter');
// variable_del('lexicon_separate_letters');
// variable_del('lexicon_allow_no_description');
// variable_del('lexicon_show_description');
// variable_del('lexicon_link_to_term_page');
// variable_del('lexicon_link_related');
// variable_del('lexicon_term_class');
// variable_del('lexicon_mark_terms');
// variable_del('lexicon_match');
// variable_del('lexicon_case');
// variable_del('lexicon_replace_all');
// variable_del('lexicon_blocking_tags');
// variable_del('lexicon_link');
// variable_del('lexicon_replace');
// variable_del('lexicon_superscript');
// variable_del('lexicon_icon');
// variable_del('lexicon_alphabet');
// variable_del('lexicon_digits');
// variable_del('lexicon_suppress_unused');
// variable_del('lexicon_alphabar_separator');
// variable_del('lexicon_alphabar_instruction');
// variable_del('lexicon_block_lexicon_random_term_link');
// variable_del('lexicon_block_lexicon_random_term_step');
// variable_del('lexicon_block_lexicon_random_term_interval');
// variable_del('lexicon_block_lexicon_random_term_vids');
// variable_del('lexicon_block_lexicon_random_term_last');
// variable_del('lexicon_block_lexicon_random_term_tid');
// variable_del('lexicon_block_lexicon_random_term_trim');
// variable_del('lexicon_block_lexicon_random_term_trim_length');
// variable_del('lexicon_block_lexicon_random_term_trim_ellipsis');
// variable_del('lexicon_block_lexicon_random_term_read_more_link');
// variable_del('lexicon_block_lexicon_random_term_read_more_link_text');
// // Let's make sure the filter cache is cleared.
// cache_clear_all(NULL, 'cache_filter');
// drupal_set_message(t('The Lexicon module has been uninstalled. You will still need to decide what to do with vocabularies that were used.'), 'warning');
}