-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfraction.install
More file actions
24 lines (20 loc) · 878 Bytes
/
fraction.install
File metadata and controls
24 lines (20 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
/**
* @file
* Install, update, and uninstall functions for the fraction module.
*/
/**
* Implements hook_requirements().
*/
function fraction_requirements($phase) {
$requirements = [];
// If BCMath is not available, add a note to the status page.
if ($phase == 'runtime' && !function_exists('bcadd')) {
$requirements['fraction'] = [
'title' => t('BCMath is not available'),
'description' => t('The Fraction module uses BCMath (when available) to ensure calculations are performed with maximum precision. Without BCMath, Fraction will still work, but normal PHP float arithmetic will be used. For an overview of float arithmetic limitations, see <a href="http://php.net/manual/en/language.types.float.php">http://php.net/manual/en/language.types.float.php</a>.'),
'severity' => REQUIREMENT_WARNING,
];
}
return $requirements;
}