forked from geckos/jquery_update
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjquery_update.install
executable file
·65 lines (53 loc) · 1.41 KB
/
jquery_update.install
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
<?php
/**
* @file
* Install file for jQuery Update.
*/
/**
* Implementation of hook_requirements().
*/
function jquery_update_requirements($phase) {
$requirements = array();
$t = get_t();
if ($phase == 'runtime') {
$requirements['jquery_update'] = array(
'title' => $t('jQuery Update'),
'severity' => REQUIREMENT_OK,
'value' => jquery_update_get_version(),
);
}
return $requirements;
}
/**
* Implementation of hook_install().
*/
function jquery_update_install() {
// Set the module's weight high so that it runs after other modules.
db_query("UPDATE {system} SET weight = 99 WHERE name = 'jquery_update' and type = 'module'");
}
/**
* Set module's weight high so that it runs after other modules.
*/
function jquery_update_update_6100() {
$ret = array();
$ret[] = update_sql("UPDATE {system} SET weight = 99 WHERE name = 'jquery_update' and type = 'module'");
return $ret;
}
/**
* The packed version of jQuery is no longer distributed. If that is the chosen
* version update to minified.
*/
function jquery_update_update_6200() {
$ret = array();
if (variable_get('jquery_update_compression_type', 'min') == 'pack') {
variable_set('jquery_update_compression_type', 'min');
}
return $ret;
}
/**
* Implementation of hook_uninstall().
*/
function jquery_update_uninstall() {
variable_del('jquery_update_replace');
variable_del('jquery_update_compression_type');
}