-
Notifications
You must be signed in to change notification settings - Fork 37
/
islandora_audio.install
57 lines (53 loc) · 1.5 KB
/
islandora_audio.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
<?php
/**
* @file
* Install hooks for this module.
*/
/**
* Implements hook_requirements().
*/
function islandora_audio_requirements($phase) {
$t = get_t();
$lame = variable_get('islandora_lame_url', '/usr/bin/lame');
$value = $t('Avaliable');
$description = NULL;
$severity = REQUIREMENT_OK;
if (!is_executable($lame)) {
$value = $t('Not Found');
$description = $t('Islandora is not configured to process audio. Click <a href="http://lame.sourceforge.net/download.php">here</a> for installation instructions.');
$severity = REQUIREMENT_WARNING;
if (variable_get('islandora_audio_defer_derivatives_on_ingest', FALSE)) {
$severity = REQUIREMENT_INFO;
}
}
return array(
array(
'title' => $t('LAME'),
'value' => $value,
'description' => $description,
'severity' => $severity,
),
);
}
/**
* Implements hook_install().
*/
function islandora_audio_install() {
module_load_include('inc', 'islandora', 'includes/solution_packs');
islandora_install_solution_pack('islandora_audio');
}
/**
* Implements hook_uninstall().
*/
function islandora_audio_uninstall() {
module_load_include('inc', 'islandora', 'includes/solution_packs');
islandora_install_solution_pack('islandora_audio', 'uninstall');
$variables = array(
'islandora_audio_defer_derivatives_on_ingest',
'islandora_audio_viewers',
'islandora_lame_url',
'islandora_audio_obj_fallback',
'islandora_audio_vbr_quality',
);
array_walk($variables, 'variable_del');
}