function date_popup_requirements in Date 6
Same name and namespace in other branches
- 5.2 date_popup/date_popup.install \date_popup_requirements()
- 6.2 date_popup/date_popup.install \date_popup_requirements()
Implementation of hook_requirements(). Make sure a site timezone name has been selected.
File
- date_popup/
date_popup.install, line 6
Code
function date_popup_requirements($phase) {
$requirements = array();
$t = get_t();
switch ($phase) {
case 'runtime':
$error = FALSE;
if (!file_exists(drupal_get_path('module', 'date_popup') . '/lib/jquery.timeentry.pack.js')) {
$message .= t('<p>Download jquery.timeentry.pack.js and jquery.timeentry.css from the jquery-timeentry home page at !link and install them in the /lib/ folder of the Date Popup module.</p>', array(
'!link' => l('http://home.iprimus.com.au/kbwood/jquery/timeEntry.html', 'http://home.iprimus.com.au/kbwood/jquery/timeEntry.html', array(), NULL, NULL, FALSE, TRUE),
));
}
if (!empty($message)) {
$requirements['date_popup_files'] = array(
'title' => $t('Date Popup requirements'),
'value' => $message,
'severity' => REQUIREMENT_ERROR,
);
}
break;
case 'install':
break;
}
return $requirements;
}