Loading core/modules/comment/comment.module +2 −2 Original line number Diff line number Diff line Loading @@ -35,9 +35,9 @@ * Comments changed after this time may be marked new, updated, or read, * depending on their state for the current user. Defaults to 30 days ago. * * @todo Remove when https://www.drupal.org/node/1029708 lands. * @todo Remove when https://www.drupal.org/node/2006632 lands. */ define('COMMENT_NEW_LIMIT', REQUEST_TIME - 30 * 24 * 60 * 60); define('COMMENT_NEW_LIMIT', ((int) $_SERVER['REQUEST_TIME']) - 30 * 24 * 60 * 60); /** * Implements hook_help(). Loading core/modules/file/file.module +1 −1 Original line number Diff line number Diff line Loading @@ -446,7 +446,7 @@ function file_cron() { $fids = Drupal::entityQuery('file') ->accessCheck(FALSE) ->condition('status', FileInterface::STATUS_PERMANENT, '<>') ->condition('changed', REQUEST_TIME - $age, '<') ->condition('changed', \Drupal::time()->getRequestTime() - $age, '<') ->range(0, 100) ->execute(); $files = $file_storage->loadMultiple($fids); Loading core/modules/history/history.module +6 −3 Original line number Diff line number Diff line Loading @@ -20,8 +20,10 @@ * * Entities changed within this time may be marked as new, updated, or read, * depending on their state for the current user. Defaults to 30 days ago. * * @todo Remove when https://www.drupal.org/node/2006632 lands. */ define('HISTORY_READ_LIMIT', REQUEST_TIME - 30 * 24 * 60 * 60); define('HISTORY_READ_LIMIT', ((int) $_SERVER['REQUEST_TIME']) - 30 * 24 * 60 * 60); /** * Implements hook_help(). Loading Loading @@ -109,16 +111,17 @@ function history_write($nid, $account = NULL) { } if ($account->isAuthenticated()) { $request_time = \Drupal::time()->getRequestTime(); \Drupal::database()->merge('history') ->keys([ 'uid' => $account->id(), 'nid' => $nid, ]) ->fields(['timestamp' => REQUEST_TIME]) ->fields(['timestamp' => $request_time]) ->execute(); // Update static cache. $history = &drupal_static('history_read_multiple', []); $history[$nid] = REQUEST_TIME; $history[$nid] = $request_time; } } Loading core/modules/image/image.admin.inc +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ function template_preprocess_image_style_preview(&$variables) { $variables['style_name'] = $style->label(); // Cache bypass token. $variables['cache_bypass'] = REQUEST_TIME; $variables['cache_bypass'] = \Drupal::time()->getRequestTime(); // Sample image info. $sample_width = 160; Loading core/modules/locale/locale.batch.inc +2 −2 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ function locale_translation_batch_status_finished($success, $results) { if (!isset($results['failed_files']) && !isset($results['files'])) { \Drupal::messenger()->addStatus(t('Nothing to check.')); } \Drupal::state()->set('locale.translation_last_checked', REQUEST_TIME); \Drupal::state()->set('locale.translation_last_checked', \Drupal::time()->getRequestTime()); } else { \Drupal::messenger()->addError(t('An error occurred trying to check available interface translation updates.')); Loading Loading @@ -219,7 +219,7 @@ function locale_translation_batch_fetch_import($project, $langcode, $options, &$ function locale_translation_batch_fetch_finished($success, $results) { \Drupal::moduleHandler()->loadInclude('locale', 'inc', 'locale.bulk'); if ($success) { \Drupal::state()->set('locale.translation_last_checked', REQUEST_TIME); \Drupal::state()->set('locale.translation_last_checked', \Drupal::time()->getRequestTime()); } return locale_translate_batch_finished($success, $results); } Loading Loading
core/modules/comment/comment.module +2 −2 Original line number Diff line number Diff line Loading @@ -35,9 +35,9 @@ * Comments changed after this time may be marked new, updated, or read, * depending on their state for the current user. Defaults to 30 days ago. * * @todo Remove when https://www.drupal.org/node/1029708 lands. * @todo Remove when https://www.drupal.org/node/2006632 lands. */ define('COMMENT_NEW_LIMIT', REQUEST_TIME - 30 * 24 * 60 * 60); define('COMMENT_NEW_LIMIT', ((int) $_SERVER['REQUEST_TIME']) - 30 * 24 * 60 * 60); /** * Implements hook_help(). Loading
core/modules/file/file.module +1 −1 Original line number Diff line number Diff line Loading @@ -446,7 +446,7 @@ function file_cron() { $fids = Drupal::entityQuery('file') ->accessCheck(FALSE) ->condition('status', FileInterface::STATUS_PERMANENT, '<>') ->condition('changed', REQUEST_TIME - $age, '<') ->condition('changed', \Drupal::time()->getRequestTime() - $age, '<') ->range(0, 100) ->execute(); $files = $file_storage->loadMultiple($fids); Loading
core/modules/history/history.module +6 −3 Original line number Diff line number Diff line Loading @@ -20,8 +20,10 @@ * * Entities changed within this time may be marked as new, updated, or read, * depending on their state for the current user. Defaults to 30 days ago. * * @todo Remove when https://www.drupal.org/node/2006632 lands. */ define('HISTORY_READ_LIMIT', REQUEST_TIME - 30 * 24 * 60 * 60); define('HISTORY_READ_LIMIT', ((int) $_SERVER['REQUEST_TIME']) - 30 * 24 * 60 * 60); /** * Implements hook_help(). Loading Loading @@ -109,16 +111,17 @@ function history_write($nid, $account = NULL) { } if ($account->isAuthenticated()) { $request_time = \Drupal::time()->getRequestTime(); \Drupal::database()->merge('history') ->keys([ 'uid' => $account->id(), 'nid' => $nid, ]) ->fields(['timestamp' => REQUEST_TIME]) ->fields(['timestamp' => $request_time]) ->execute(); // Update static cache. $history = &drupal_static('history_read_multiple', []); $history[$nid] = REQUEST_TIME; $history[$nid] = $request_time; } } Loading
core/modules/image/image.admin.inc +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ function template_preprocess_image_style_preview(&$variables) { $variables['style_name'] = $style->label(); // Cache bypass token. $variables['cache_bypass'] = REQUEST_TIME; $variables['cache_bypass'] = \Drupal::time()->getRequestTime(); // Sample image info. $sample_width = 160; Loading
core/modules/locale/locale.batch.inc +2 −2 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ function locale_translation_batch_status_finished($success, $results) { if (!isset($results['failed_files']) && !isset($results['files'])) { \Drupal::messenger()->addStatus(t('Nothing to check.')); } \Drupal::state()->set('locale.translation_last_checked', REQUEST_TIME); \Drupal::state()->set('locale.translation_last_checked', \Drupal::time()->getRequestTime()); } else { \Drupal::messenger()->addError(t('An error occurred trying to check available interface translation updates.')); Loading Loading @@ -219,7 +219,7 @@ function locale_translation_batch_fetch_import($project, $langcode, $options, &$ function locale_translation_batch_fetch_finished($success, $results) { \Drupal::moduleHandler()->loadInclude('locale', 'inc', 'locale.bulk'); if ($success) { \Drupal::state()->set('locale.translation_last_checked', REQUEST_TIME); \Drupal::state()->set('locale.translation_last_checked', \Drupal::time()->getRequestTime()); } return locale_translate_batch_finished($success, $results); } Loading