summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--date/date.install1
-rw-r--r--date/date_views.inc6
-rw-r--r--date_api.install8
3 files changed, 13 insertions, 2 deletions
diff --git a/date/date.install b/date/date.install
index 044c46f..ae15a98 100644
--- a/date/date.install
+++ b/date/date.install
@@ -199,6 +199,7 @@ function date_update_5104() {
*/
function date_update_5200() {
$ret = array();
+ module_enable('date_timezone');
// Make sure date module loads after date_api.
$ret[] = update_sql("UPDATE {system} SET weight = 1 WHERE name = 'date'");
diff --git a/date/date_views.inc b/date/date_views.inc
index 688f7c3..57e5bc4 100644
--- a/date/date_views.inc
+++ b/date/date_views.inc
@@ -121,12 +121,14 @@ function _date_views_filter_handler($op, $filter, $filterinfo, &$query, $field_t
date_modify($end, $results[2] . $results[3] .' '. $results[4]);
$adjust = date_format($end, 'U') - date_format($start, 'U');
}
- else {
- $value = isset($filter['value']['date']) ? $filter['value']['date'] : $filter['value'];
+ elseif (module_exists('date_popup')) {
$element = _date_views_handler_filter_date_value_form($field);
$element['#value'] = $filter['value'];
$value = date_popup_input_value($element);
}
+ else {
+ $value = $filter['value'];
+ }
// Do some validation of input values before creating any SQL.
$type = $filterinfo['type'];
diff --git a/date_api.install b/date_api.install
index ac7ed82..8ea13b3 100644
--- a/date_api.install
+++ b/date_api.install
@@ -99,6 +99,14 @@ function date_api_update_5000() {
return $ret;
}
+function date_api_update_5200() {
+ $ret = array();
+ if (!function_exists('date_create')) {
+ module_enable('date_php4');
+ }
+ return $ret;
+}
+
/**
* These strings exist only for the extractor to pick them up and make them
* available for translation. Putting them here keeps them from being parsed