aboutsummaryrefslogtreecommitdiff
path: root/exif.install
blob: f0f9fbdc88ae676b4cf0c3698953498b6b828467 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
// $Id: exif.install,v 1.4.2.5 2010/03/19 22:17:00 rapsli Exp $
/**
 * @file the install part of the module
*/

/**
 * Implementation of hook_install().
 */
function exif_install() {
    db_query("UPDATE {system} SET weight = %d WHERE name = '%s'", -10, 'exif');
}

function exif_requirements($phase) {
  $t = get_t();
  if ($phase == 'runtime' || $phase == 'install') {
    if (!function_exists('exif_read_data')) {
      $requirements['exif_read_data'] = array(
        'title' => $t('Function exif_read_data not available'),
        'value' => $t('The Function exif_read_data is not available on the system.'),
        'severity' => REQUIREMENT_ERROR,
      );
    }
  }

  if ($phase == 'runtime' || $phase == 'install') {
    $xmp                 = class_exists('SXMPFiles');
    $requirements['xmp'] = array(
      'title' => $t('XMP'),
      'value' => $xmp,
    );
    if (!$xmp) {
      $requirements['xmp']['description'] = $t("You don't have XMP Toolkit installed in your system.");
      $requirements['xmp']['severity']    = REQUIREMENT_ERROR;
    }
  }
  
  return $requirements;
}