forked from mitchmac/islandora_solution_pack_compound
-
Notifications
You must be signed in to change notification settings - Fork 36
/
islandora_compound_object.install
47 lines (43 loc) · 1.47 KB
/
islandora_compound_object.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
<?php
/**
* @file
* islandora_compound_object.install
*
* Implement install/uninstall hooks.
*/
/**
* Implements hook_install().
*/
function islandora_compound_object_install() {
module_load_include('inc', 'islandora', 'includes/solution_packs');
islandora_install_solution_pack('islandora_compound_object');
}
/**
* Implements hook_uninstall().
*/
function islandora_compound_object_uninstall() {
module_load_include('inc', 'islandora', 'includes/solution_packs');
islandora_install_solution_pack('islandora_compound_object', 'uninstall');
$variables = array(
'islandora_compound_object_compound_children',
'islandora_compound_object_thumbnail_child',
'islandora_compound_object_relationship',
'islandora_compound_object_hide_child_objects_ri',
'islandora_compound_object_hide_child_objects_solr',
'islandora_compound_object_solr_fq',
'islandora_compound_object_use_jail_view',
'islandora_compound_object_query_backend',
'islandora_compound_object_tn_deriv_hooks',
'islandora_compound_object_redirect_to_first',
);
array_walk($variables, 'variable_del');
}
/**
* Update compound backend name.
*/
function islandora_compound_update_7001() {
$backend = variable_get('islandora_compound_object_query_backend', ISLANDORA_COMPOUND_OBJECT_LEGACY_BACKEND);
if ($backend == 'islandora_basic_collection_sparql_query_backend') {
variable_set('islandora_compound_object_query_backend', ISLANDORA_COMPOUND_OBJECT_SPARQL_BACKEND);
}
}