/[drupal]/contributions/modules/timeline/timeline.install
ViewVC logotype

Contents of /contributions/modules/timeline/timeline.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download) (as text)
Sat Jul 25 02:14:49 2009 UTC (4 months ago) by xamanu
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +0 -0 lines
File MIME type: text/x-php
Bringing HEAD in sync with the DRUPAL-6--2 branch
1 <?php
2 // $Id: timeline.install,v 1.2.2.1.2.1 2009/07/23 18:21:23 xamanu Exp $
3
4 /**
5 * @file
6 * Timeline module installation and upgrade code.
7 */
8
9 //////////////////////////////////////////////////////////////////////////////
10
11 /**
12 * Implementation of hook_install().
13 */
14 function timeline_install() { }
15
16
17 /**
18 * Implementation of hook_requirements().
19 */
20 function timeline_requirements($phase) {
21 $requirements = array();
22 $t = get_t();
23
24 // This is the minimum required version for the Date API so that it will
25 // work with this module.
26 $required_version = 5.2;
27
28 // Make sure the matching version of date_api is installed.
29 // Use info instead of an error at install time since the problem may
30 // just be that they were installed in the wrong order.
31 switch ($phase) {
32 case 'runtime':
33 if (variable_get('date_api_version', 0) < $required_version) {
34 $requirements['timeline_api_version'] = array(
35 'title' => $t('Timeline requirements'),
36 'value' => $t('The Timeline module requires a more current version of the Date API. Please check for a newer version.'),
37 'severity' => REQUIREMENT_ERROR,
38 );
39 }
40 break;
41 case 'install':
42 if (variable_get('date_api_version', 0) < $required_version) {
43 $requirements['Timeline_api_version'] = array(
44 'title' => $t('Timeline requirements'),
45 'value' => $t('The Timeline module requires the latest version of the Date API, be sure you are installing the latest versions of both modules.'),
46 'severity' => REQUIREMENT_INFO,
47 );
48 }
49 break;
50 }
51 return $requirements;
52 }

  ViewVC Help
Powered by ViewVC 1.1.2