File: /home/nexper/www/sites/all/modules/photobox/photobox.install
<?php
/**
* @file
* Install, update and uninstall functions for the Photobox module.
*/
/**
* Implements hook_install().
*/
function photobox_install() {
}
/**
* Implements hook_uninstall().
*/
function photobox_uninstall() {
variable_del('photobox_library_path');
}
/**
* Implements hook_requirements().
*/
function photobox_requirements($phase) {
$requirements = array();
// Ensure translations don't break at install time
$t = get_t();
if ($phase == 'runtime') {
if ($photobox_version = _photobox_library_version()) {
$requirements['photobox'] = array(
'title' => $t('Photobox library'),
'value' => $photobox_version,
'severity' => REQUIREMENT_OK,
);
}
else {
$requirements['photobox'] = array(
'title' => $t('Photobox library'),
'value' => $t('Photobox library is missing'),
'severity' => REQUIREMENT_ERROR,
);
}
}
return $requirements;
}