diff --git a/core/includes/common.inc b/core/includes/common.inc index 0c52e67..1de9c2b 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -1827,14 +1827,14 @@ function format_interval($interval, $granularity = 2, $langcode = NULL) { * A UNIX timestamp to format. * @param $type * (optional) The format to use, one of: - * - One of the built-in formats: 'system_short', 'system_medium', - * 'system_long', 'html_datetime', 'html_date', 'html_time', + * - One of the built-in formats: 'short', 'medium', + * 'long', 'html_datetime', 'html_date', 'html_time', * 'html_yearless_date', 'html_week', 'html_month', 'html_year'. * - The name of a date type defined by a module in * hook_date_format_types(), if it's been assigned a format. * - The machine name of an administrator-defined date format. * - 'custom', to use $format. - * Defaults to 'system_medium'. + * Defaults to 'medium'. * @param $format * (optional) If $type is 'custom', a PHP date format string suitable for * input to date(). Use a backslash to escape ordinary text, so it does not @@ -1850,7 +1850,7 @@ function format_interval($interval, $granularity = 2, $langcode = NULL) { * @return * A translated date string in the requested format. */ -function format_date($timestamp, $type = 'system_medium', $format = '', $timezone = NULL, $langcode = NULL) { +function format_date($timestamp, $type = 'medium', $format = '', $timezone = NULL, $langcode = NULL) { // Use the advanced drupal_static() pattern, since this is called very often. static $drupal_static_fast; if (!isset($drupal_static_fast)) { @@ -1882,9 +1882,9 @@ function format_date($timestamp, $type = 'system_medium', $format = '', $timezon $format = config('system.date')->get('formats.' . $type . '.pattern.' . $key); } - // Fall back to system_medium if a format was not found. + // Fall back to medium if a format was not found. if (empty($format)) { - $format = config('system.date')->get('formats.system_medium.pattern.' . $key); + $format = config('system.date')->get('formats.medium.pattern.' . $key); } // Call $date->format(). diff --git a/core/includes/form.inc b/core/includes/form.inc index c63e382..cbc786f 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -2996,7 +2996,7 @@ function form_process_date($element) { $element['#tree'] = TRUE; // Determine the order of day, month, year in the site's chosen date format. - $format = config('system.date')->get('formats.system_short.pattern'); + $format = config('system.date')->get('formats.short.pattern'); $format = $format['php']; $sort = array(); $sort['day'] = max(strpos($format, 'd'), strpos($format, 'j')); diff --git a/core/modules/aggregator/aggregator.pages.inc b/core/modules/aggregator/aggregator.pages.inc index c8d7a70..0c04c7d 100644 --- a/core/modules/aggregator/aggregator.pages.inc +++ b/core/modules/aggregator/aggregator.pages.inc @@ -335,7 +335,7 @@ function template_preprocess_aggregator_item(&$variables) { $variables['source_date'] = t('%ago ago', array('%ago' => format_interval(REQUEST_TIME - $item->timestamp))); } else { - $variables['source_date'] = format_date($item->timestamp, 'system_medium'); + $variables['source_date'] = format_date($item->timestamp, 'medium'); } $variables['categories'] = array(); diff --git a/core/modules/comment/comment.admin.inc b/core/modules/comment/comment.admin.inc index db73365..e0a0165 100644 --- a/core/modules/comment/comment.admin.inc +++ b/core/modules/comment/comment.admin.inc @@ -128,7 +128,7 @@ function comment_admin_overview($form, &$form_state, $arg) { '#href' => 'node/' . $comment->nid, ), ), - 'changed' => format_date($comment->changed, 'system_short'), + 'changed' => format_date($comment->changed, 'short'), ); $links = array(); $links['edit'] = array( diff --git a/core/modules/comment/comment.tokens.inc b/core/modules/comment/comment.tokens.inc index b15d79e..c77cb67 100644 --- a/core/modules/comment/comment.tokens.inc +++ b/core/modules/comment/comment.tokens.inc @@ -186,11 +186,11 @@ function comment_tokens($type, $tokens, array $data = array(), array $options = break; case 'created': - $replacements[$original] = format_date($comment->created, 'system_medium', '', NULL, $langcode); + $replacements[$original] = format_date($comment->created, 'medium', '', NULL, $langcode); break; case 'changed': - $replacements[$original] = format_date($comment->changed, 'system_medium', '', NULL, $langcode); + $replacements[$original] = format_date($comment->changed, 'medium', '', NULL, $langcode); break; case 'node': diff --git a/core/modules/dblog/dblog.admin.inc b/core/modules/dblog/dblog.admin.inc index dfa7190..d6b921a 100644 --- a/core/modules/dblog/dblog.admin.inc +++ b/core/modules/dblog/dblog.admin.inc @@ -63,7 +63,7 @@ function dblog_overview() { // Cells array('class' => array('icon')), t($dblog->type), - format_date($dblog->timestamp, 'system_short'), + format_date($dblog->timestamp, 'short'), theme('dblog_message', array('event' => $dblog, 'link' => TRUE)), theme('username', array('account' => $dblog)), filter_xss($dblog->link), @@ -162,7 +162,7 @@ function dblog_event($id) { ), array( array('data' => t('Date'), 'header' => TRUE), - format_date($dblog->timestamp, 'system_long'), + format_date($dblog->timestamp, 'long'), ), array( array('data' => t('User'), 'header' => TRUE), diff --git a/core/modules/file/lib/Drupal/file/Tests/FileTokenReplaceTest.php b/core/modules/file/lib/Drupal/file/Tests/FileTokenReplaceTest.php index 187c41e..4d56b7b 100644 --- a/core/modules/file/lib/Drupal/file/Tests/FileTokenReplaceTest.php +++ b/core/modules/file/lib/Drupal/file/Tests/FileTokenReplaceTest.php @@ -56,8 +56,8 @@ function testFileTokenReplacement() { $tests['[file:mime]'] = check_plain($file->filemime); $tests['[file:size]'] = format_size($file->filesize); $tests['[file:url]'] = check_plain(file_create_url($file->uri)); - $tests['[file:timestamp]'] = format_date($file->timestamp, 'system_medium', '', NULL, $language_interface->langcode); - $tests['[file:timestamp:short]'] = format_date($file->timestamp, 'system_short', '', NULL, $language_interface->langcode); + $tests['[file:timestamp]'] = format_date($file->timestamp, 'medium', '', NULL, $language_interface->langcode); + $tests['[file:timestamp:short]'] = format_date($file->timestamp, 'short', '', NULL, $language_interface->langcode); $tests['[file:owner]'] = check_plain(user_format_name($this->admin_user)); $tests['[file:owner:uid]'] = $file->uid; diff --git a/core/modules/node/node.admin.inc b/core/modules/node/node.admin.inc index 79705be..8a49c9c 100644 --- a/core/modules/node/node.admin.inc +++ b/core/modules/node/node.admin.inc @@ -539,7 +539,7 @@ function node_admin_nodes() { 'type' => check_plain(node_get_type_label($node)), 'author' => theme('username', array('account' => $node)), 'status' => $node->status ? t('published') : t('not published'), - 'changed' => format_date($node->changed, 'system_short'), + 'changed' => format_date($node->changed, 'short'), ); if ($multilingual) { $options[$node->nid]['language_name'] = language_name($node->langcode); diff --git a/core/modules/node/node.pages.inc b/core/modules/node/node.pages.inc index e169d7f..71c72b8 100644 --- a/core/modules/node/node.pages.inc +++ b/core/modules/node/node.pages.inc @@ -266,13 +266,13 @@ function node_revision_overview($node) { foreach ($revisions as $revision) { $row = array(); if ($revision->current_vid > 0) { - $row[] = array('data' => t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'system_short'), "node/$node->nid"), '!username' => theme('username', array('account' => $revision)))) + $row[] = array('data' => t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'short'), "node/$node->nid"), '!username' => theme('username', array('account' => $revision)))) . (($revision->log != '') ? '

' . filter_xss($revision->log) . '

' : ''), 'class' => array('revision-current')); $row[] = array('data' => drupal_placeholder(t('current revision')), 'class' => array('revision-current')); } else { - $row[] = t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'system_short'), "node/$node->nid/revisions/$revision->vid/view"), '!username' => theme('username', array('account' => $revision)))) + $row[] = t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'short'), "node/$node->nid/revisions/$revision->vid/view"), '!username' => theme('username', array('account' => $revision)))) . (($revision->log != '') ? '

' . filter_xss($revision->log) . '

' : ''); if ($revert_permission) { $links['revert'] = array( diff --git a/core/modules/node/node.tokens.inc b/core/modules/node/node.tokens.inc index 2388135..2d783c9 100644 --- a/core/modules/node/node.tokens.inc +++ b/core/modules/node/node.tokens.inc @@ -176,11 +176,11 @@ function node_tokens($type, $tokens, array $data = array(), array $options = arr break; case 'created': - $replacements[$original] = format_date($node->created, 'system_medium', '', NULL, $langcode); + $replacements[$original] = format_date($node->created, 'medium', '', NULL, $langcode); break; case 'changed': - $replacements[$original] = format_date($node->changed, 'system_medium', '', NULL, $langcode); + $replacements[$original] = format_date($node->changed, 'medium', '', NULL, $langcode); break; } } diff --git a/core/modules/search/search.pages.inc b/core/modules/search/search.pages.inc index 9d99063..b6a1930 100644 --- a/core/modules/search/search.pages.inc +++ b/core/modules/search/search.pages.inc @@ -122,7 +122,7 @@ function template_preprocess_search_result(&$variables) { $info['user'] = $result['user']; } if (!empty($result['date'])) { - $info['date'] = format_date($result['date'], 'system_short'); + $info['date'] = format_date($result['date'], 'short'); } if (isset($result['extra']) && is_array($result['extra'])) { $info = array_merge($info, $result['extra']); diff --git a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsTokenReplaceTest.php b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsTokenReplaceTest.php index dd25d52..0b5909d 100644 --- a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsTokenReplaceTest.php +++ b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsTokenReplaceTest.php @@ -46,7 +46,7 @@ function testStatisticsTokenReplacement() { $tests['[node:total-count]'] = 1; $tests['[node:day-count]'] = 1; $tests['[node:last-view]'] = format_date($statistics['timestamp']); - $tests['[node:last-view:short]'] = format_date($statistics['timestamp'], 'system_short'); + $tests['[node:last-view:short]'] = format_date($statistics['timestamp'], 'short'); // Test to make sure that we generated something for each token. $this->assertFalse(in_array(0, array_map('strlen', $tests)), 'No empty tokens generated.'); diff --git a/core/modules/system/config/system.date.yml b/core/modules/system/config/system.date.yml index a1b1120..ab21797 100644 --- a/core/modules/system/config/system.date.yml +++ b/core/modules/system/config/system.date.yml @@ -8,19 +8,19 @@ timezone: default: '0' warn: '0' formats: - system_long: + long: name: 'Default Long Date' pattern: php: 'l, F j, Y - H:i' intl: 'EEEE, LLLL d, yyyy - kk:mm' locked: 0 - system_medium: + medium: name: 'Default Medium Date' pattern: php: 'D, m/d/Y - H:i' intl: 'ccc, MM/dd/yyyy - kk:mm' locked: 0 - system_short: + short: name: 'Default Short Date' pattern: php: 'm/d/Y - H:i' diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php index 5d8858e..e89a302 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php @@ -38,9 +38,9 @@ function setUp() { parent::setUp('language'); config('system.date') ->set('timezone.user.configurable', 1) - ->set('formats.system_long.pattern.php', 'l, j. F Y - G:i') - ->set('formats.system_medium.pattern.php', 'j. F Y - G:i') - ->set('formats.system_short.pattern.php', 'Y M j - g:ia') + ->set('formats.long.pattern.php', 'l, j. F Y - G:i') + ->set('formats.medium.pattern.php', 'j. F Y - G:i') + ->set('formats.short.pattern.php', 'Y M j - g:ia') ->save(); variable_set('locale_custom_strings_' . self::LANGCODE, array( @@ -69,7 +69,7 @@ function testAdminDefinedFormatDate() { $timestamp = strtotime('2007-03-10T00:00:00+00:00'); $this->assertIdentical(format_date($timestamp, 'example_style', '', 'America/Los_Angeles'), '9 Mar 07', 'Test format_date() using an admin-defined date type.'); - $this->assertIdentical(format_date($timestamp, 'undefined_style'), format_date($timestamp, 'system_medium'), 'Test format_date() defaulting to medium when $type not found.'); + $this->assertIdentical(format_date($timestamp, 'undefined_style'), format_date($timestamp, 'medium'), 'Test format_date() defaulting to medium when $type not found.'); } /** @@ -122,9 +122,9 @@ function testFormatDate() { $this->assertIdentical(format_date($timestamp, 'custom', 'l, d-M-y H:i:s T', 'America/Los_Angeles', 'en'), 'Sunday, 25-Mar-07 17:00:00 PDT', 'Test a different language.'); $this->assertIdentical(format_date($timestamp, 'custom', 'l, d-M-y H:i:s T', 'Europe/London'), 'Monday, 26-Mar-07 01:00:00 BST', 'Test a different time zone.'); $this->assertIdentical(format_date($timestamp, 'custom', 'l, d-M-y H:i:s T'), 'domingo, 25-Mar-07 17:00:00 PDT', 'Test custom date format.'); - $this->assertIdentical(format_date($timestamp, 'system_long'), 'domingo, 25. marzo 2007 - 17:00', 'Test long date format.'); - $this->assertIdentical(format_date($timestamp, 'system_medium'), '25. marzo 2007 - 17:00', 'Test medium date format.'); - $this->assertIdentical(format_date($timestamp, 'system_short'), '2007 Mar 25 - 5:00pm', 'Test short date format.'); + $this->assertIdentical(format_date($timestamp, 'long'), 'domingo, 25. marzo 2007 - 17:00', 'Test long date format.'); + $this->assertIdentical(format_date($timestamp, 'medium'), '25. marzo 2007 - 17:00', 'Test medium date format.'); + $this->assertIdentical(format_date($timestamp, 'short'), '2007 Mar 25 - 5:00pm', 'Test short date format.'); $this->assertIdentical(format_date($timestamp), '25. marzo 2007 - 17:00', 'Test default date format.'); // Test HTML time element formats. $this->assertIdentical(format_date($timestamp, 'html_datetime'), '2007-03-25T17:00:00-0700', 'Test html_datetime date format.'); diff --git a/core/modules/system/lib/Drupal/system/Tests/System/DateFormatsLanguageTest.php b/core/modules/system/lib/Drupal/system/Tests/System/DateFormatsLanguageTest.php index 172973d..ff16e61 100644 --- a/core/modules/system/lib/Drupal/system/Tests/System/DateFormatsLanguageTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/System/DateFormatsLanguageTest.php @@ -79,17 +79,17 @@ function testLocalizeDateFormats() { $this->drupalGet('admin/config/regional/date-time/locale'); $this->assertText('French', 'Configured languages appear.'); $edit = array( - 'date_format_system_long' => 'example_style_fr', - 'date_format_system_medium' => 'example_style_fr', - 'date_format_system_short' => 'example_style_fr', + 'date_format_long' => 'example_style_fr', + 'date_format_medium' => 'example_style_fr', + 'date_format_short' => 'example_style_fr', ); $this->drupalPost('admin/config/regional/date-time/locale/fr/edit', $edit, t('Save configuration')); $this->assertText(t('Configuration saved.'), 'French date formats updated.'); $edit = array( - 'date_format_system_long' => 'example_style_en', - 'date_format_system_medium' => 'example_style_en', - 'date_format_system_short' => 'example_style_en', + 'date_format_long' => 'example_style_en', + 'date_format_medium' => 'example_style_en', + 'date_format_short' => 'example_style_en', ); $this->drupalPost('admin/config/regional/date-time/locale/en/edit', $edit, t('Save configuration')); $this->assertText(t('Configuration saved.'), 'English date formats updated.'); diff --git a/core/modules/system/lib/Drupal/system/Tests/System/DateTimeTest.php b/core/modules/system/lib/Drupal/system/Tests/System/DateTimeTest.php index 53dccbe..2c6571a 100644 --- a/core/modules/system/lib/Drupal/system/Tests/System/DateTimeTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/System/DateTimeTest.php @@ -46,7 +46,7 @@ function testTimeZoneHandling() { $config = config('system.date') ->set('timezone.default', 'Pacific/Honolulu') ->set('timezone.user.configurable', 0) - ->set('formats.system_medium.pattern.php', 'Y-m-d H:i:s O') + ->set('formats.medium.pattern.php', 'Y-m-d H:i:s O') ->save(); // Create some nodes with different authored-on dates. diff --git a/core/modules/system/lib/Drupal/system/Tests/System/TokenReplaceTest.php b/core/modules/system/lib/Drupal/system/Tests/System/TokenReplaceTest.php index 1c367fb..3859041 100644 --- a/core/modules/system/lib/Drupal/system/Tests/System/TokenReplaceTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/System/TokenReplaceTest.php @@ -44,7 +44,7 @@ function testTokenReplacement() { $target .= check_plain($account->name); $target .= format_interval(REQUEST_TIME - $node->created, 2, $language_interface->langcode); $target .= check_plain($user->name); - $target .= format_date(REQUEST_TIME, 'system_short', '', NULL, $language_interface->langcode); + $target .= format_date(REQUEST_TIME, 'short', '', NULL, $language_interface->langcode); // Test that the clear parameter cleans out non-existent tokens. $result = token_replace($source, array('node' => $node), array('langcode' => $language_interface->langcode, 'clear' => TRUE)); @@ -154,9 +154,9 @@ function testSystemDateTokenReplacement() { // Generate and test tokens. $tests = array(); - $tests['[date:short]'] = format_date($date, 'system_short', '', NULL, $language_interface->langcode); - $tests['[date:medium]'] = format_date($date, 'system_medium', '', NULL, $language_interface->langcode); - $tests['[date:long]'] = format_date($date, 'system_long', '', NULL, $language_interface->langcode); + $tests['[date:short]'] = format_date($date, 'short', '', NULL, $language_interface->langcode); + $tests['[date:medium]'] = format_date($date, 'medium', '', NULL, $language_interface->langcode); + $tests['[date:long]'] = format_date($date, 'long', '', NULL, $language_interface->langcode); $tests['[date:custom:m/j/Y]'] = format_date($date, 'custom', 'm/j/Y', NULL, $language_interface->langcode); $tests['[date:since]'] = format_interval((REQUEST_TIME - $date), 2, $language_interface->langcode); $tests['[date:raw]'] = filter_xss($date); diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index f289e04..cd11621 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -3454,7 +3454,7 @@ function hook_tokens($type, $tokens, array $data = array(), array $options = arr break; case 'created': - $replacements[$original] = format_date($node->created, 'system_medium', '', NULL, $langcode); + $replacements[$original] = format_date($node->created, 'medium', '', NULL, $langcode); break; } } diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 9010666..bcccfa5 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -3490,7 +3490,7 @@ function system_time_zones($blank = NULL) { // reasons and should not be used, the list is filtered by a regular // expression. if (preg_match('!^((Africa|America|Antarctica|Arctic|Asia|Atlantic|Australia|Europe|Indian|Pacific)/|UTC$)!', $zone)) { - $zones[$zone] = t('@zone: @date', array('@zone' => t(str_replace('_', ' ', $zone)), '@date' => format_date(REQUEST_TIME, 'custom', config('system.date')->get('formats.system_long.pattern.php') . ' O', $zone))); + $zones[$zone] = t('@zone: @date', array('@zone' => t(str_replace('_', ' ', $zone)), '@date' => format_date(REQUEST_TIME, 'custom', config('system.date')->get('formats.long.pattern.php') . ' O', $zone))); } } // Sort the translated time zones alphabetically. diff --git a/core/modules/system/system.tokens.inc b/core/modules/system/system.tokens.inc index 12876a8..a5e7ad2 100644 --- a/core/modules/system/system.tokens.inc +++ b/core/modules/system/system.tokens.inc @@ -55,15 +55,15 @@ function system_token_info() { // Date related tokens. $date['short'] = array( 'name' => t("Short format"), - 'description' => t("A date in 'short' format. (%date)", array('%date' => format_date(REQUEST_TIME, 'system_short'))), + 'description' => t("A date in 'short' format. (%date)", array('%date' => format_date(REQUEST_TIME, 'short'))), ); $date['medium'] = array( 'name' => t("Medium format"), - 'description' => t("A date in 'medium' format. (%date)", array('%date' => format_date(REQUEST_TIME, 'system_medium'))), + 'description' => t("A date in 'medium' format. (%date)", array('%date' => format_date(REQUEST_TIME, 'medium'))), ); $date['long'] = array( 'name' => t("Long format"), - 'description' => t("A date in 'long' format. (%date)", array('%date' => format_date(REQUEST_TIME, 'system_long'))), + 'description' => t("A date in 'long' format. (%date)", array('%date' => format_date(REQUEST_TIME, 'long'))), ); $date['custom'] = array( 'name' => t("Custom format"), @@ -184,15 +184,15 @@ function system_tokens($type, $tokens, array $data = array(), array $options = a foreach ($tokens as $name => $original) { switch ($name) { case 'short': - $replacements[$original] = format_date($date, 'system_short', '', NULL, $langcode); + $replacements[$original] = format_date($date, 'short', '', NULL, $langcode); break; case 'medium': - $replacements[$original] = format_date($date, 'system_medium', '', NULL, $langcode); + $replacements[$original] = format_date($date, 'medium', '', NULL, $langcode); break; case 'long': - $replacements[$original] = format_date($date, 'system_long', '', NULL, $langcode); + $replacements[$original] = format_date($date, 'long', '', NULL, $langcode); break; case 'since': @@ -245,7 +245,7 @@ function system_tokens($type, $tokens, array $data = array(), array $options = a // These tokens are default variations on the chained tokens handled below. case 'timestamp': - $replacements[$original] = format_date($file->timestamp, 'system_medium', '', NULL, $langcode); + $replacements[$original] = format_date($file->timestamp, 'medium', '', NULL, $langcode); break; case 'owner': diff --git a/core/modules/user/lib/Drupal/user/Tests/UserTimeZoneTest.php b/core/modules/user/lib/Drupal/user/Tests/UserTimeZoneTest.php index ba170b8..575bfc1 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserTimeZoneTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserTimeZoneTest.php @@ -29,7 +29,7 @@ function testUserTimeZone() { $config = config('system.date') ->set('timezone.user.configurable', 1) ->set('timezone.default', 'America/Los_Angeles') - ->set('formats.system_medium.pattern.php', 'Y-m-d H:i T') + ->set('formats.medium.pattern.php', 'Y-m-d H:i T') ->save(); // Create a user account and login. diff --git a/core/modules/user/lib/Drupal/user/Tests/UserTokenReplaceTest.php b/core/modules/user/lib/Drupal/user/Tests/UserTokenReplaceTest.php index 87f9959..d14e826 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserTokenReplaceTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserTokenReplaceTest.php @@ -65,10 +65,10 @@ function testUserTokenReplacement() { $tests['[user:mail]'] = check_plain($account->mail); $tests['[user:url]'] = url("user/$account->uid", $url_options); $tests['[user:edit-url]'] = url("user/$account->uid/edit", $url_options); - $tests['[user:last-login]'] = format_date($account->login, 'system_medium', '', NULL, $language_interface->langcode); - $tests['[user:last-login:short]'] = format_date($account->login, 'system_short', '', NULL, $language_interface->langcode); - $tests['[user:created]'] = format_date($account->created, 'system_medium', '', NULL, $language_interface->langcode); - $tests['[user:created:short]'] = format_date($account->created, 'system_short', '', NULL, $language_interface->langcode); + $tests['[user:last-login]'] = format_date($account->login, 'medium', '', NULL, $language_interface->langcode); + $tests['[user:last-login:short]'] = format_date($account->login, 'short', '', NULL, $language_interface->langcode); + $tests['[user:created]'] = format_date($account->created, 'medium', '', NULL, $language_interface->langcode); + $tests['[user:created:short]'] = format_date($account->created, 'short', '', NULL, $language_interface->langcode); $tests['[current-user:name]'] = check_plain(user_format_name($global_account)); // Test to make sure that we generated something for each token. diff --git a/core/modules/user/user.tokens.inc b/core/modules/user/user.tokens.inc index 30d984b..bc37434 100644 --- a/core/modules/user/user.tokens.inc +++ b/core/modules/user/user.tokens.inc @@ -103,12 +103,12 @@ function user_tokens($type, $tokens, array $data = array(), array $options = arr // These tokens are default variations on the chained tokens handled below. case 'last-login': - $replacements[$original] = !empty($account->login) ? format_date($account->login, 'system_medium', '', NULL, $langcode) : t('never'); + $replacements[$original] = !empty($account->login) ? format_date($account->login, 'medium', '', NULL, $langcode) : t('never'); break; case 'created': // In the case of user_presave the created date may not yet be set. - $replacements[$original] = !empty($account->created) ? format_date($account->created, 'system_medium', '', NULL, $langcode) : t('not yet created'); + $replacements[$original] = !empty($account->created) ? format_date($account->created, 'medium', '', NULL, $langcode) : t('not yet created'); break; } } diff --git a/core/modules/views/config/views.view.glossary.yml b/core/modules/views/config/views.view.glossary.yml index 4d0d274..18f059c 100644 --- a/core/modules/views/config/views.view.glossary.yml +++ b/core/modules/views/config/views.view.glossary.yml @@ -47,7 +47,7 @@ display: table: node field: changed label: 'Last update' - date_format: system_long + date_format: long arguments: title: id: title diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldDateTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldDateTest.php index f7f1a10..05466e9 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldDateTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldDateTest.php @@ -57,7 +57,7 @@ public function testFieldDate() { foreach ($timezones as $timezone) { $dates = array( 'small' => format_date($time, 'system_small', '', $timezone), - 'medium' => format_date($time, 'system_medium', '', $timezone), + 'medium' => format_date($time, 'medium', '', $timezone), 'large' => format_date($time, 'system_large', '', $timezone), 'custom' => format_date($time, 'custom', 'c', $timezone), );