stableversion-3.0
Last change
on this file since c43ea01 was
177a560,
checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago
|
se agrego el directorio de modulos contribuidos de drupal
|
-
Propiedad mode establecida a
100644
|
File size:
1.4 KB
|
Línea | |
---|
1 | <?php |
---|
2 | |
---|
3 | /** |
---|
4 | * Implementation of hook_requirements(). |
---|
5 | * Based on code from "3 Tips For Using External Libraries With Drupal": |
---|
6 | * http://engineeredweb.com/blog/10/5/3-tips-using-external-libraries-drupal |
---|
7 | */ |
---|
8 | function highcharts_requirements($phase) { |
---|
9 | $requirements = array(); |
---|
10 | // Ensure translations do not break at install time |
---|
11 | $t = get_t(); |
---|
12 | |
---|
13 | $requirements['highcharts'] = array( |
---|
14 | 'title' => $t('Highcharts Library'), |
---|
15 | ); |
---|
16 | |
---|
17 | if ($phase == 'install') { |
---|
18 | if (!module_exists('libraries')) { |
---|
19 | $requirements['highcharts']['severity'] = REQUIREMENT_ERROR; |
---|
20 | $requirements['highcharts']['description'] = $t('Please download and enable libraries module before enabling this module.'); |
---|
21 | } |
---|
22 | |
---|
23 | return $requirements; |
---|
24 | } |
---|
25 | |
---|
26 | $libraries = libraries_get_libraries(); |
---|
27 | if (isset($libraries['highcharts'])) { |
---|
28 | $requirements['highcharts']['value'] = $t('Installed'); |
---|
29 | $requirements['highcharts']['severity'] = REQUIREMENT_OK; |
---|
30 | } |
---|
31 | else { |
---|
32 | if ($phase=='runtime') { |
---|
33 | $requirements['highcharts']['value'] = $t('Not Installed'); |
---|
34 | } |
---|
35 | $requirements['highcharts']['severity'] = REQUIREMENT_ERROR; |
---|
36 | $requirements['highcharts']['description'] = $t('The Highcharts module was not installed. Please download the Highcharts library (%url) before installing the Highcharts module. See the README.txt file for more information.', array('%url' => 'http://www.highcharts.com/download')); |
---|
37 | } |
---|
38 | |
---|
39 | return $requirements; |
---|
40 | } |
---|
Nota: Vea
TracBrowser
para ayuda de uso del navegador del repositorio.