-
Notifications
You must be signed in to change notification settings - Fork 0
/
date-i18n-title-p0-1188380-3.patch
142 lines (137 loc) · 5.68 KB
/
date-i18n-title-p0-1188380-3.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
diff --git date.theme date.theme
index 444b253..478668b 100644
--- date.theme
+++ date.theme
@@ -12,8 +12,8 @@
/**
* Theme Start/End date combination in the view.
*
- * $entity->date_id
- * If set, this will show only an individual date on a field with
+ * $entity->date_id
+ * If set, this will show only an individual date on a field with
* multiple dates. The value should be a string that contains
* the following values, separated with periods:
* - module name of the module adding the item
@@ -21,15 +21,15 @@
* - field name
* - delta value of the field to be displayed
* - other information the module's custom theme might need
- *
+ *
* Used by the calendar module and available for other uses.
* example: 'date.217.field_date.3.test'
- *
+ *
* $entity->date_repeat_show
* If true, tells the theme to show all the computed values
* of a repeating date. If not true or not set, only the
* start date and the repeat rule will be displayed.
- *
+ *
* $dates['format'] - the format string used on these dates
* $dates['value']['local']['object'] - the local date object for the Start date
* $dates['value2']['local']['object'] - the local date object for the End date
@@ -62,7 +62,7 @@ function theme_date_display_combination($vars) {
$add_rdf = $vars['add_rdf'];
$precision = date_granularity_precision($field['settings']['granularity']);
- $output = '';
+ $output = '';
// If date_id is set for this field and the delta doesn't match, don't display it.
if (!empty($entity->date_id)) {
@@ -77,12 +77,12 @@ function theme_date_display_combination($vars) {
// Check the formatter settings to see if the repeat rule should be
// displayed. Show it only with the first multiple value date.
list($id) = entity_extract_ids($entity_type, $entity);
- if (!in_array($id, $repeating_ids) && module_exists('date_repeat')
+ if (!in_array($id, $repeating_ids) && module_exists('date_repeat')
&& !empty($item['rrule']) && $options['show_repeat_rule'] == 'show') {
module_load_include('inc', 'date', 'date_repeat');
$repeat_vars = array(
- 'field' => $field,
- 'item' => $item,
+ 'field' => $field,
+ 'item' => $item,
'entity_type' => $entity_type,
'entity' => $entity,
);
@@ -106,14 +106,14 @@ function theme_date_display_combination($vars) {
case 'value':
$date1 = $dates['value']['formatted'];
$date2 = $date1;
- break;
+ break;
case 'value2':
$date2 = $dates['value2']['formatted'];
$date1 = $date2;
break;
default:
$date1 = $dates['value']['formatted'];
- $date2 = $dates['value2']['formatted'];
+ $date2 = $dates['value2']['formatted'];
break;
}
@@ -144,7 +144,7 @@ function theme_date_display_combination($vars) {
// Start and End dates match or there is no End date, display a complete single date.
elseif ($date1 == $date2 || empty($date2)) {
$output .= theme('date_display_single', array(
- 'date' => $date1,
+ 'date' => $date1,
'timezone' => $timezone,
'attributes' => $attributes,
'rdf_mapping' => $rdf_mapping,
@@ -155,13 +155,13 @@ function theme_date_display_combination($vars) {
// Same day, different times, don't repeat the date but show both Start and End times.
// We can NOT do this if the replacement value is an integer instead of a time string.
elseif ($has_time_string && $dates['value']['formatted_date'] == $dates['value2']['formatted_date']) {
- // Replace the original time with the start/end time in the formatted start date.
+ // Replace the original time with the start/end time in the formatted start date.
// Make sure that parentheses or brackets wrapping the time will be retained in the
// final result.
$time = theme('date_display_range', array(
- 'date1' => $time1,
+ 'date1' => $time1,
'date2' => $time2,
- 'timezone' => $timezone,
+ 'timezone' => $timezone,
'attributes' => $attributes,
'rdf_mapping' => $rdf_mapping,
'add_rdf' => $add_rdf,
@@ -169,7 +169,7 @@ function theme_date_display_combination($vars) {
));
$replaced = str_replace($time1, $time, $date1);
$output .= theme('date_display_single', array(
- 'date' => $replaced,
+ 'date' => $replaced,
'timezone' => $timezone,
'attributes' => array(),
'rdf_mapping' => array(),
@@ -180,9 +180,9 @@ function theme_date_display_combination($vars) {
// Different days, display both in their entirety.
else {
$output .= theme('date_display_range', array(
- 'date1' => $date1,
- 'date2' => $date2,
- 'timezone' => $timezone,
+ 'date1' => $date1,
+ 'date2' => $date2,
+ 'timezone' => $timezone,
'attributes' => $attributes,
'rdf_mapping' => $rdf_mapping,
'add_rdf' => $add_rdf,
@@ -295,7 +295,7 @@ function theme_date_display_interval($vars) {
}
$time_ago_vars = array(
- 'start_date' => $dates['value']['local']['object'],
+ 'start_date' => $dates['value']['local']['object'],
'end_date' => $dates['value2']['local']['object'],
'interval' => $options['interval'],
);
@@ -389,7 +389,7 @@ function theme_date_combo($vars) {
// Group start/end items together in fieldset.
$fieldset = array(
- '#title' => t($instance['label']) . ' ' . ($element['#delta'] > 0 ? intval($element['#delta'] + 1) : ''),
+ '#title' => check_plain($element['#title']) . ' ' . ($element['#delta'] > 0 ? intval($element['#delta'] + 1) : ''),
'#value' => '',
'#description' => !empty($element['#fieldset_description']) ? $element['#fieldset_description'] : '',
'#attributes' => array(),