Révision 1f683914
Ajouté par Assos Assos il y a environ 7 ans
drupal7/sites/all/modules/date/date.info | ||
---|---|---|
15 | 15 |
files[] = tests/date_views_popup.test |
16 | 16 |
files[] = tests/date_form.test |
17 | 17 |
|
18 |
; Information added by Drupal.org packaging script on 2016-04-27
|
|
19 |
version = "7.x-2.10-rc1"
|
|
18 |
; Information added by Drupal.org packaging script on 2017-03-29
|
|
19 |
version = "7.x-2.10-rc2"
|
|
20 | 20 |
core = "7.x" |
21 | 21 |
project = "date" |
22 |
datestamp = "1461750711"
|
|
22 |
datestamp = "1490783291"
|
|
23 | 23 |
|
drupal7/sites/all/modules/date/date.theme | ||
---|---|---|
400 | 400 |
|
401 | 401 |
// Group start/end items together in fieldset. |
402 | 402 |
$fieldset = array( |
403 |
'#title' => field_filter_xss(t($element['#title'])) . ' ' . ($element['#delta'] > 0 ? intval($element['#delta'] + 1) : ''),
|
|
403 |
'#title' => field_filter_xss(t($element['#title'])) . ($element['#delta'] > 0 ? ' ' . intval($element['#delta'] + 1) : ''),
|
|
404 | 404 |
'#value' => '', |
405 |
'#description' => !empty($element['#fieldset_description']) ? $element['#fieldset_description'] : '',
|
|
405 |
'#description' => !empty($element['#description']) ? $element['#description'] : '',
|
|
406 | 406 |
'#attributes' => array('class' => array('date-combo')), |
407 | 407 |
'#children' => $element['#children'], |
408 | 408 |
); |
drupal7/sites/all/modules/date/date_all_day/date_all_day.info | ||
---|---|---|
5 | 5 |
package = Date/Time |
6 | 6 |
core = 7.x |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2016-04-27
|
|
9 |
version = "7.x-2.10-rc1"
|
|
8 |
; Information added by Drupal.org packaging script on 2017-03-29
|
|
9 |
version = "7.x-2.10-rc2"
|
|
10 | 10 |
core = "7.x" |
11 | 11 |
project = "date" |
12 |
datestamp = "1461750711"
|
|
12 |
datestamp = "1490783291"
|
|
13 | 13 |
|
drupal7/sites/all/modules/date/date_api/date_api.info | ||
---|---|---|
9 | 9 |
files[] = date_api.module |
10 | 10 |
files[] = date_api_sql.inc |
11 | 11 |
|
12 |
; Information added by Drupal.org packaging script on 2016-04-27
|
|
13 |
version = "7.x-2.10-rc1"
|
|
12 |
; Information added by Drupal.org packaging script on 2017-03-29
|
|
13 |
version = "7.x-2.10-rc2"
|
|
14 | 14 |
core = "7.x" |
15 | 15 |
project = "date" |
16 |
datestamp = "1461750711"
|
|
16 |
datestamp = "1490783291"
|
|
17 | 17 |
|
drupal7/sites/all/modules/date/date_api/date_api.module | ||
---|---|---|
1926 | 1926 |
// Pick a day in the middle of the month to avoid timezone shifts. |
1927 | 1927 |
$datetime = date_pad($year, 4) . '-' . date_pad($month) . '-15 00:00:00'; |
1928 | 1928 |
$date = new DateObject($datetime); |
1929 |
return $date->format('t'); |
|
1929 |
if ($date->errors) { |
|
1930 |
return FALSE; |
|
1931 |
} |
|
1932 |
else { |
|
1933 |
return $date->format('t'); |
|
1934 |
} |
|
1930 | 1935 |
} |
1931 | 1936 |
|
1932 | 1937 |
/** |
drupal7/sites/all/modules/date/date_context/date_context.info | ||
---|---|---|
8 | 8 |
|
9 | 9 |
files[] = date_context.module |
10 | 10 |
files[] = plugins/date_context_date_condition.inc |
11 |
; Information added by Drupal.org packaging script on 2016-04-27
|
|
12 |
version = "7.x-2.10-rc1"
|
|
11 |
; Information added by Drupal.org packaging script on 2017-03-29
|
|
12 |
version = "7.x-2.10-rc2"
|
|
13 | 13 |
core = "7.x" |
14 | 14 |
project = "date" |
15 |
datestamp = "1461750711"
|
|
15 |
datestamp = "1490783291"
|
|
16 | 16 |
|
drupal7/sites/all/modules/date/date_elements.inc | ||
---|---|---|
337 | 337 |
'#date_label_position' => $instance['widget']['settings']['label_position'], |
338 | 338 |
); |
339 | 339 |
|
340 |
$description = !empty($element['#description']) ? t($element['#description']) : ''; |
|
341 |
unset($element['#description']); |
|
340 |
// Date repeat is a multiple value field. So the description is removed from |
|
341 |
// the single element earlier. Let's get it back. |
|
342 |
if (isset($element['show_repeat_settings']) && !empty($element['value']['#instance']['description'])) { |
|
343 |
$element['#description'] = $element['value']['#instance']['description']; |
|
344 |
} |
|
342 | 345 |
|
343 | 346 |
// Give this element the right type, using a Date API |
344 | 347 |
// or a Date Popup element type. |
... | ... | |
383 | 386 |
$element[$to_field]['#prefix'] = ''; |
384 | 387 |
// Users with JS enabled will never see initially blank values for the end |
385 | 388 |
// date (see Drupal.date.EndDateHandler()), so hide the message for them. |
386 |
$description .= '<span class="js-hide"> ' . t("Empty 'End date' values will use the 'Start date' values.") . '</span>'; |
|
387 |
$element['#fieldset_description'] = $description; |
|
389 |
$element['#description'] .= '<span class="js-hide"> ' . t("Empty 'End date' values will use the 'Start date' values.") . '</span>'; |
|
388 | 390 |
if ($field['settings']['todate'] == 'optional') { |
389 | 391 |
$element[$to_field]['#states'] = array( |
390 | 392 |
'visible' => array( |
... | ... | |
395 | 397 |
); |
396 | 398 |
} |
397 | 399 |
} |
398 |
else { |
|
399 |
$element[$from_field]['#description'] = $description; |
|
400 |
} |
|
401 | 400 |
|
402 | 401 |
// Create label for error messages that make sense in multiple values |
403 | 402 |
// and when the title field is left blank. |
drupal7/sites/all/modules/date/date_migrate/date_migrate.info | ||
---|---|---|
4 | 4 |
package = Date/Time |
5 | 5 |
hidden = TRUE |
6 | 6 |
|
7 |
; Information added by Drupal.org packaging script on 2016-04-27
|
|
8 |
version = "7.x-2.10-rc1"
|
|
7 |
; Information added by Drupal.org packaging script on 2017-03-29
|
|
8 |
version = "7.x-2.10-rc2"
|
|
9 | 9 |
core = "7.x" |
10 | 10 |
project = "date" |
11 |
datestamp = "1461750711"
|
|
11 |
datestamp = "1490783290"
|
|
12 | 12 |
|
drupal7/sites/all/modules/date/date_migrate/date_migrate_example/date_migrate_example.info | ||
---|---|---|
20 | 20 |
project = "date_migrate_example" |
21 | 21 |
version = "7.x-2.0" |
22 | 22 |
|
23 |
; Information added by Drupal.org packaging script on 2016-04-27
|
|
24 |
version = "7.x-2.10-rc1"
|
|
23 |
; Information added by Drupal.org packaging script on 2017-03-29
|
|
24 |
version = "7.x-2.10-rc2"
|
|
25 | 25 |
core = "7.x" |
26 | 26 |
project = "date" |
27 |
datestamp = "1461750711"
|
|
27 |
datestamp = "1490783290"
|
|
28 | 28 |
|
drupal7/sites/all/modules/date/date_popup/date_popup.info | ||
---|---|---|
7 | 7 |
|
8 | 8 |
stylesheets[all][] = themes/datepicker.1.7.css |
9 | 9 |
|
10 |
; Information added by Drupal.org packaging script on 2016-04-27
|
|
11 |
version = "7.x-2.10-rc1"
|
|
10 |
; Information added by Drupal.org packaging script on 2017-03-29
|
|
11 |
version = "7.x-2.10-rc2"
|
|
12 | 12 |
core = "7.x" |
13 | 13 |
project = "date" |
14 |
datestamp = "1461750711"
|
|
14 |
datestamp = "1490783290"
|
|
15 | 15 |
|
drupal7/sites/all/modules/date/date_popup/date_popup.module | ||
---|---|---|
585 | 585 |
// If something was input but there is no date, the date is invalid. |
586 | 586 |
// If the field is empty and required, set error message and return. |
587 | 587 |
$error_field = implode('][', $element['#parents']); |
588 |
if (empty($date) || !empty($date->errors)) {
|
|
588 |
if ((empty($element['#value']['date']) && empty($element['#value']['time'])) || !empty($date->errors)) {
|
|
589 | 589 |
if (is_object($date) && !empty($date->errors)) { |
590 | 590 |
$message = t('The value input for field %field is invalid:', array('%field' => $label)); |
591 | 591 |
$message .= '<br />' . implode('<br />', $date->errors); |
... | ... | |
618 | 618 |
*/ |
619 | 619 |
function date_popup_input_date($element, $input, $auto_complete = FALSE) { |
620 | 620 |
if (empty($input) || !is_array($input) || !array_key_exists('date', $input) || empty($input['date'])) { |
621 |
return NULL; |
|
621 |
//check if there is no time associated in the input variable. This is the exception scenario where the user has entered only time and not date. |
|
622 |
if(empty($input['time'])) |
|
623 |
return NULL; |
|
622 | 624 |
} |
623 | 625 |
date_popup_add(); |
624 | 626 |
$granularity = date_format_order($element['#date_format']); |
... | ... | |
627 | 629 |
|
628 | 630 |
$format = date_popup_date_format($element); |
629 | 631 |
$format .= $has_time ? ' ' . date_popup_time_format($element) : ''; |
630 |
$datetime = trim($input['date']); |
|
632 |
//check if date is empty, if yes, then leave it blank. |
|
633 |
$datetime = !empty($input['date']) ? trim($input['date']) : ''; |
|
631 | 634 |
$datetime .= $has_time ? ' ' . trim($input['time']) : ''; |
632 | 635 |
$date = new DateObject($datetime, $element['#date_timezone'], $format); |
636 |
//if the variable is time only then set TimeOnly to TRUE |
|
637 |
if(empty($input['date']) && !empty($input['time']) ){ |
|
638 |
$date->timeOnly = 'TRUE'; |
|
639 |
} |
|
633 | 640 |
if (is_object($date)) { |
634 | 641 |
$date->limitGranularity($granularity); |
635 | 642 |
if ($date->validGranularity($granularity, $flexible)) { |
drupal7/sites/all/modules/date/date_repeat/date_repeat.info | ||
---|---|---|
7 | 7 |
files[] = tests/date_repeat.test |
8 | 8 |
files[] = tests/date_repeat_form.test |
9 | 9 |
|
10 |
; Information added by Drupal.org packaging script on 2016-04-27
|
|
11 |
version = "7.x-2.10-rc1"
|
|
10 |
; Information added by Drupal.org packaging script on 2017-03-29
|
|
11 |
version = "7.x-2.10-rc2"
|
|
12 | 12 |
core = "7.x" |
13 | 13 |
project = "date" |
14 |
datestamp = "1461750711"
|
|
14 |
datestamp = "1490783290"
|
|
15 | 15 |
|
drupal7/sites/all/modules/date/date_repeat/tests/date_repeat_form.test | ||
---|---|---|
25 | 25 |
|
26 | 26 |
// Create and log in our privileged user. |
27 | 27 |
$this->privileged_user = $this->drupalCreateUser(array( |
28 |
'administer content types', 'administer nodes', 'bypass node access', 'view date repeats' |
|
28 |
'administer content types', 'administer nodes', 'bypass node access', 'view date repeats', 'administer fields'
|
|
29 | 29 |
)); |
30 | 30 |
$this->drupalLogin($this->privileged_user); |
31 | 31 |
|
drupal7/sites/all/modules/date/date_repeat_field/date_repeat_field.info | ||
---|---|---|
7 | 7 |
package = Date/Time |
8 | 8 |
core = 7.x |
9 | 9 |
|
10 |
; Information added by Drupal.org packaging script on 2016-04-27
|
|
11 |
version = "7.x-2.10-rc1"
|
|
10 |
; Information added by Drupal.org packaging script on 2017-03-29
|
|
11 |
version = "7.x-2.10-rc2"
|
|
12 | 12 |
core = "7.x" |
13 | 13 |
project = "date" |
14 |
datestamp = "1461750711"
|
|
14 |
datestamp = "1490783290"
|
|
15 | 15 |
|
drupal7/sites/all/modules/date/date_tools/date_tools.info | ||
---|---|---|
6 | 6 |
configure = admin/config/date/tools |
7 | 7 |
files[] = tests/date_tools.test |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2016-04-27
|
|
10 |
version = "7.x-2.10-rc1"
|
|
9 |
; Information added by Drupal.org packaging script on 2017-03-29
|
|
10 |
version = "7.x-2.10-rc2"
|
|
11 | 11 |
core = "7.x" |
12 | 12 |
project = "date" |
13 |
datestamp = "1461750711"
|
|
13 |
datestamp = "1490783290"
|
|
14 | 14 |
|
drupal7/sites/all/modules/date/date_tools/tests/date_tools.test | ||
---|---|---|
28 | 28 |
|
29 | 29 |
// Create and log in our privileged user. |
30 | 30 |
$this->privileged_user = $this->drupalCreateUser( |
31 |
array('administer content types', 'administer nodes', 'bypass node access', 'administer date tools') |
|
31 |
array('administer content types', 'administer nodes', 'bypass node access', 'administer date tools', 'administer fields')
|
|
32 | 32 |
); |
33 | 33 |
$this->drupalLogin($this->privileged_user); |
34 | 34 |
|
drupal7/sites/all/modules/date/date_views/date_views.info | ||
---|---|---|
12 | 12 |
files[] = includes/date_views.views.inc |
13 | 13 |
files[] = includes/date_views_plugin_pager.inc |
14 | 14 |
|
15 |
; Information added by Drupal.org packaging script on 2016-04-27
|
|
16 |
version = "7.x-2.10-rc1"
|
|
15 |
; Information added by Drupal.org packaging script on 2017-03-29
|
|
16 |
version = "7.x-2.10-rc2"
|
|
17 | 17 |
core = "7.x" |
18 | 18 |
project = "date" |
19 |
datestamp = "1461750711"
|
|
19 |
datestamp = "1490783290"
|
|
20 | 20 |
|
drupal7/sites/all/modules/date/date_views/includes/date_views_filter_handler.inc | ||
---|---|---|
93 | 93 |
$this->related_table_alias = $this->query->ensure_table($field['table_name'], $this->relationship); |
94 | 94 |
} |
95 | 95 |
else { |
96 |
$this->related_table_alias = null;
|
|
96 |
$this->related_table_alias = NULL;
|
|
97 | 97 |
} |
98 | 98 |
$table_alias = !empty($this->related_table_alias) ? $this->related_table_alias : $field['table_name']; |
99 | 99 |
$field_name = $table_alias . '.' . $field['field_name']; |
drupal7/sites/all/modules/date/tests/date_field.test | ||
---|---|---|
16 | 16 |
|
17 | 17 |
// Create and log in our privileged user. |
18 | 18 |
$this->privileged_user = $this->drupalCreateUser( |
19 |
array('administer content types', 'administer nodes', 'bypass node access', 'administer date tools') |
|
19 |
array('administer content types', 'administer nodes', 'bypass node access', 'administer date tools', 'administer fields')
|
|
20 | 20 |
); |
21 | 21 |
$this->drupalLogin($this->privileged_user); |
22 | 22 |
|
drupal7/sites/all/modules/date/tests/date_migrate.test | ||
---|---|---|
18 | 18 |
'name' => 'Date Migration', |
19 | 19 |
'description' => 'Test migration into date fields', |
20 | 20 |
'group' => 'Date', |
21 |
'dependencies' => array('migrate', 'features'), |
|
21 | 22 |
); |
22 | 23 |
} |
23 | 24 |
|
drupal7/sites/all/modules/date/tests/date_test/date_test.info | ||
---|---|---|
6 | 6 |
hidden = TRUE |
7 | 7 |
dependencies[] = date |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2016-04-27
|
|
10 |
version = "7.x-2.10-rc1"
|
|
9 |
; Information added by Drupal.org packaging script on 2017-03-29
|
|
10 |
version = "7.x-2.10-rc2"
|
|
11 | 11 |
core = "7.x" |
12 | 12 |
project = "date" |
13 |
datestamp = "1461750711"
|
|
13 |
datestamp = "1490783290"
|
|
14 | 14 |
|
drupal7/sites/all/modules/date/tests/date_timezone.test | ||
---|---|---|
16 | 16 |
); |
17 | 17 |
} |
18 | 18 |
|
19 |
public function setUp() { |
|
20 |
parent::setUp(); |
|
21 |
// Set the timezone explicitly. Otherwise the site's default timezone is |
|
22 |
// used, which defaults to the server timezone when installing Drupal. This |
|
23 |
// depends on the environment and is therefore uncertain. |
|
24 |
// The Australia/Sydney timezone is chosen so all tests are run using an |
|
25 |
// edge case scenario (UTC+10 and DST). |
|
26 |
variable_set('date_default_timezone', 'Australia/Sydney'); |
|
27 |
} |
|
28 |
|
|
19 | 29 |
/** |
20 | 30 |
* @todo. |
21 | 31 |
*/ |
... | ... | |
23 | 33 |
// Create a date fields with combinations of various timezone handling and |
24 | 34 |
// granularity. |
25 | 35 |
foreach (array('date', 'datestamp', 'datetime') as $field_type) { |
26 |
foreach (array('site', 'none', 'date', 'user', 'utc') as $tz_handling) { |
|
36 |
foreach (array('site', 'none', 'date', 'user', 'utc', 'Europe/Dublin') as $tz_handling) {
|
|
27 | 37 |
foreach (array('year', 'month', 'day', 'hour', 'minute', 'second') as $max_granularity) { |
28 | 38 |
// Skip invalid combinations. |
29 | 39 |
if (in_array($max_granularity, array('year', 'month', 'day')) && $tz_handling != 'none') { |
... | ... | |
182 | 192 |
case 'hour': |
183 | 193 |
$edit[$field_name . '[und][0][value][date]'] = '10/07/2010 - 10'; |
184 | 194 |
$edit[$field_name . '[und][0][value2][date]'] = '10/07/2010 - 11'; |
185 |
$should_be = 'Thu, 10/07/2010 - 10 to Thu, 10/07/2010 - 11'; |
|
195 |
if ($tz_handling == 'utc') { |
|
196 |
$should_be = 'Thu, 10/07/2010 - 21 to Thu, 10/07/2010 - 22'; |
|
197 |
} |
|
198 |
else { |
|
199 |
$should_be = 'Thu, 10/07/2010 - 10 to Thu, 10/07/2010 - 11'; |
|
200 |
} |
|
186 | 201 |
break; |
187 | 202 |
case 'minute': |
188 | 203 |
$edit[$field_name . '[und][0][value][date]'] = '10/07/2010 - 10:30'; |
189 | 204 |
$edit[$field_name . '[und][0][value2][date]'] = '10/07/2010 - 11:30'; |
190 |
$should_be = 'Thu, 10/07/2010 - 10:30 to 11:30'; |
|
205 |
if ($tz_handling == 'utc') { |
|
206 |
$should_be = 'Thu, 10/07/2010 - 21:30 to 22:30'; |
|
207 |
} |
|
208 |
else { |
|
209 |
$should_be = 'Thu, 10/07/2010 - 10:30 to 11:30'; |
|
210 |
} |
|
191 | 211 |
break; |
192 | 212 |
case 'second': |
193 | 213 |
$edit[$field_name . '[und][0][value][date]'] = '10/07/2010 - 10:30:30'; |
194 | 214 |
$edit[$field_name . '[und][0][value2][date]'] = '10/07/2010 - 11:30:30'; |
195 |
$should_be = 'Thu, 10/07/2010 - 10:30:30 to 11:30:30'; |
|
215 |
if ($tz_handling == 'utc') { |
|
216 |
$should_be = 'Thu, 10/07/2010 - 21:30:30 to 22:30:30'; |
|
217 |
} |
|
218 |
else { |
|
219 |
$should_be = 'Thu, 10/07/2010 - 10:30:30 to 11:30:30'; |
|
220 |
} |
|
196 | 221 |
break; |
197 | 222 |
} |
198 | 223 |
$this->drupalPost('node/add/story', $edit, t('Save')); |
Formats disponibles : Unified diff
Weekly update of contrib modules