function feeds_imagegrabber_requirements in Feeds Image Grabber 6
Implementation of hook_requirements().
File
- ./
feeds_imagegrabber.install, line 86 - Schema definitions install/update/uninstall hooks.
Code
function feeds_imagegrabber_requirements($phase) {
$requirements = array();
$t = get_t();
switch ($phase) {
case 'install':
case 'runtime':
module_load_include('module', 'feeds_imagegrabber', 'feeds_imagegrabber');
if (!feeds_imagegrabber_include_library('url_to_absolute.php', 'feeds_imagegrabber')) {
$requirements['feeds_imagegrabber_absoluteurl'] = array(
'title' => $t("Feeds Image Grabber"),
'description' => $t("Obtain the !conversion package and copy <b>url_to_absolute.php</b> to either the feeds_imagegrabber directory, or to <code>sites/all/libraries</code>.", array(
'!conversion' => l('UrlToAbsolute', 'http://sourceforge.net/projects/absoluteurl', array(
'absolute' => TRUE,
)),
)),
'severity' => $phase == 'install' ? REQUIREMENT_WARNING : REQUIREMENT_ERROR,
'value' => $t('url_to_absolute.php file missing'),
);
}
}
return $requirements;
}