1
|
<?php
|
2
|
|
3
|
/**
|
4
|
* @file
|
5
|
* Install, update and uninstall functions for the date_api module.
|
6
|
*/
|
7
|
|
8
|
/**
|
9
|
* Implements hook_install().
|
10
|
*/
|
11
|
function date_api_install() {
|
12
|
|
13
|
}
|
14
|
|
15
|
/**
|
16
|
* Implements hook_uninstall().
|
17
|
*/
|
18
|
function date_api_uninstall() {
|
19
|
cache()->deletePrefix('date_timezone_identifiers_list');
|
20
|
}
|
21
|
|
22
|
/**
|
23
|
* Implements hook_update_last_removed().
|
24
|
*/
|
25
|
function date_api_update_last_removed() {
|
26
|
return 7001;
|
27
|
}
|
28
|
|
29
|
/**
|
30
|
* Moves Date API informational data from variable to config.
|
31
|
*/
|
32
|
function date_api_update_8001() {
|
33
|
update_variables_to_config('date_api.info', array(
|
34
|
'date_max_year' => 'year.max',
|
35
|
'date_min_year' => 'year.min',
|
36
|
'date_php_min_year' => 'php_min_year',
|
37
|
'date_api_version' => 'version',
|
38
|
'date_db_tz_support' => 'db_tz_support',
|
39
|
));
|
40
|
}
|
41
|
|
42
|
/**
|
43
|
* Moves Date API settings from variable to config.
|
44
|
*/
|
45
|
function date_api_update_8002() {
|
46
|
update_variables_to_config('date_api.settings', array(
|
47
|
'date_api_use_iso8601' => 'iso8601',
|
48
|
));
|
49
|
}
|
50
|
|