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