1
|
<?php
|
2
|
|
3
|
/**
|
4
|
* Implements hook_install()
|
5
|
*/
|
6
|
function dwca_export_install(){
|
7
|
// Garbage collect all vde views that are older than two hours. This will
|
8
|
// greatly reduce the chance of us getting a huge site database like what
|
9
|
// happened on the zingi site.
|
10
|
// FIXME - This may no longer be required as we are no longer using the batch
|
11
|
// functions to create the views data.
|
12
|
variable_set('views_data_export_gc_expires', 7200);
|
13
|
variable_set('views_data_export_gc_chunk', -1);
|
14
|
}
|
15
|
|
16
|
/**
|
17
|
* Set the variables for already installed sites.
|
18
|
*/
|
19
|
function dwca_export_update_7001(){
|
20
|
variable_set('views_data_export_gc_expires', 7200);
|
21
|
variable_set('views_data_export_gc_chunk', -1);
|
22
|
}
|
23
|
|
24
|
/**
|
25
|
* Delete the variables.
|
26
|
*/
|
27
|
function dwca_export_update_7002(){
|
28
|
db_delete('variable')->condition('name', 'dwca_%', 'LIKE')->execute();
|
29
|
}
|