Projet

Général

Profil

Paste
Télécharger (1,16 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / feeds_jsonpath_parser / feeds_jsonpath_parser.install @ 87dbc3bf

1
<?php
2
// $Id: feeds_jsonpath_parser.install,v 1.1.2.1 2010/09/28 20:18:46 twistor Exp $
3

    
4
/**
5
 * @file
6
 * Installation file for Feeds JSONPath Parser module.
7
 */
8

    
9
/**
10
 * Implementation of hook_requirements().
11
 */
12
function feeds_jsonpath_parser_requirements($phase) {
13
  $requirements = array();
14

    
15
  if ($phase == 'install') {
16
    $t = get_t();
17
    $requirements['feeds_jsonpath_parser']['title'] = $t('Feeds JSONPath Parser');
18

    
19
    if (file_exists(dirname(__FILE__) . '/jsonpath-0.8.1.php')) {
20
      $requirements['feeds_jsonpath_parser']['severity'] = REQUIREMENT_OK;
21
      $requirements['feeds_jsonpath_parser']['value'] = '0.8.1';
22
    }
23
    else {
24
      $requirements['feeds_jsonpath_parser']['severity'] = REQUIREMENT_ERROR;
25
      $requirements['feeds_jsonpath_parser']['value'] = $t('Not found');
26
      $requirements['feeds_jsonpath_parser']['description'] = $t('The <a href="@jsonpath">JSONPath</a> plugin is missing. <a href="@download">Download</a> and place in your module directory.', array(
27
        '@jsonpath' => 'http://goessner.net/articles/JsonPath/',
28
	'@download' => 'http://jsonpath.googlecode.com/files/jsonpath-0.8.1.php',
29
      ));
30
    }
31
  }
32
  return $requirements;
33
}