-
Notifications
You must be signed in to change notification settings - Fork 1
/
wavesurfer.install
33 lines (29 loc) · 961 Bytes
/
wavesurfer.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
<?php
/**
* Implements hook_requirements().
*/
function wavesurfer_requirements($phase) {
$t = get_t();
if ($phase != 'runtime') {
return array();
}
$library = libraries_detect('wavesurfer');
if ($library && !empty($library['installed'])) {
$requirements['wavesurfer'] = array(
'title' => $t('Wavesurfer Library'),
'value' => $t('Installed @ v@version.', array('@version' => $library['version'])),
'severity' => REQUIREMENT_OK,
);
}
else {
$requirements['wavesurfer'] = array(
'title' => $t('Wavesurfer Library'),
'value' => $t('The Wavesurfer module requires the Wavesurfer library.'),
'description' => $t('The Libraries module reported the following error: !error_message<br />
Please check the installation instructions for Waveform.', array('!error_message' => filter_xss($library['error message']))
),
'severity' => REQUIREMENT_ERROR,
);
}
return $requirements;
}