summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaren Stevenson2012-01-29 03:07:55 (GMT)
committer Karen Stevenson2012-01-29 03:07:55 (GMT)
commit83c217d7a6d2daa1fa2a215d1f7ce724a7205c22 (patch)
treeea1efb28922c8a4c9372140547be339eb96512ca
parent27b9dfba98f5f8ff37efc5054a17e3d23341dab7 (diff)
parenta7490ab9840d09aa478cc74306b51a56c51e8fde (diff)
Fix git conflict.
-rw-r--r--CHANGELOG.txt1
-rw-r--r--date_all_day/date_all_day.module27
2 files changed, 14 insertions, 14 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 36e3ce3..e18d220 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -6,6 +6,7 @@ Version 7.x-2.x-dev
===================
- Issue #1209026, When date validation fails, Date Popup value is getting cleared.
+- Issue #1017216 by tim.plunkett, arlinsandbulte: Added custom date format without time shows 'all day'.
- Issue #1408014 by dasjo, We no longer need the $error_element value to display errors properly.
======================
diff --git a/date_all_day/date_all_day.module b/date_all_day/date_all_day.module
index 27df5f5..a4cad56 100644
--- a/date_all_day/date_all_day.module
+++ b/date_all_day/date_all_day.module
@@ -117,26 +117,25 @@ function theme_date_all_day($vars) {
$date2 = $date1;
}
+ $suffix = '';
if (!date_has_time($field['settings']['granularity'])) {
$format = date_limit_format($format, array('year', 'month', 'day'));
- return date_format_date($$which, 'custom', $format);
- }
-
- $format_granularity = date_format_order($format);
- $format_has_time = FALSE;
- if (in_array('hour', $format_granularity)) {
- $format_has_time = TRUE;
- }
- $all_day = date_all_day_field($field, $instance, $date1, $date2);
-
- if ($all_day && $format_has_time) {
- $format = date_limit_format($format, array('year', 'month', 'day'));
- return trim(date_format_date($$which, 'custom', $format) .' '. theme('date_all_day_label'));
}
else {
- return date_format_date($$which, 'custom', $format);
+ $format_granularity = date_format_order($format);
+ $format_has_time = FALSE;
+ if (in_array('hour', $format_granularity)) {
+ $format_has_time = TRUE;
+ }
+ $all_day = date_all_day_field($field, $instance, $date1, $date2);
+ if ($all_day && $format_has_time) {
+ $format = date_limit_format($format, array('year', 'month', 'day'));
+ $suffix = ' ' . theme('date_all_day_label');
+ }
}
+ return trim(date_format_date($$which, 'custom', $format) . $suffix);
+
}
/**