1
|
<?php
|
2
|
|
3
|
/**
|
4
|
* @file
|
5
|
* Installation code for Advanced Forum.
|
6
|
*/
|
7
|
|
8
|
/**
|
9
|
* Implements hook_install().
|
10
|
*/
|
11
|
function advanced_forum_install() {
|
12
|
db_update('system')
|
13
|
->fields(array('weight' => 15))
|
14
|
->condition('name', 'advanced_forum')
|
15
|
->execute();
|
16
|
}
|
17
|
|
18
|
/**
|
19
|
* Implements hook_uninstall().
|
20
|
*/
|
21
|
function advanced_forum_uninstall() {
|
22
|
db_delete('variable')
|
23
|
->condition('name', "advanced_forum_%", "LIKE")
|
24
|
->execute();
|
25
|
cache_clear_all('variables', 'cache_bootstrap');
|
26
|
}
|
27
|
|
28
|
/**
|
29
|
* Implements hook_update_N().
|
30
|
*/
|
31
|
function advanced_forum_update_5000() {
|
32
|
db_update('system')
|
33
|
->fields(array('weight' => 10))
|
34
|
->condition('name', 'advanced_forum')
|
35
|
->execute();
|
36
|
}
|
37
|
|
38
|
/**
|
39
|
* Implements hook_update_N().
|
40
|
*/
|
41
|
function advanced_forum_update_5003() {
|
42
|
db_drop_table('advforum_last_post');
|
43
|
}
|
44
|
|
45
|
/**
|
46
|
* Implements hook_update_N().
|
47
|
*/
|
48
|
function advanced_forum_update_5005() {
|
49
|
db_update('system')
|
50
|
->fields(array('weight' => 15))
|
51
|
->condition('name', 'advanced_forum')
|
52
|
->execute();
|
53
|
}
|
54
|
|
55
|
/**
|
56
|
* Implements hook_update_N().
|
57
|
*/
|
58
|
function advanced_forum_update_7200() {
|
59
|
if (variable_get('advanced_forum_forum_disabled') == NULL) {
|
60
|
variable_set('advanced_forum_forum_disabled', FALSE);
|
61
|
}
|
62
|
}
|