X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fhistory%2Fhistory.module;h=db563d10e8f6c668366197e42ce06ede18270c1e;hb=4f1b9b4ab48a8498afac9e2213a02a23ccf4a06c;hp=f36121ef5115336aad0c266e15594ee97e8b927a;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/history/history.module b/web/core/modules/history/history.module index f36121ef5..db563d10e 100644 --- a/web/core/modules/history/history.module +++ b/web/core/modules/history/history.module @@ -12,6 +12,7 @@ use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\user\UserInterface; /** * Entities changed before this time are always shown as read. @@ -27,7 +28,7 @@ define('HISTORY_READ_LIMIT', REQUEST_TIME - 30 * 24 * 60 * 60); function history_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.history': - $output = '

' . t('About') . '

'; + $output = '

' . t('About') . '

'; $output .= '

' . t('The History module keeps track of which content a user has read. It marks content as new or updated depending on the last time the user viewed it. History records that are older than one month are removed during cron, which means that content older than one month is always considered read. The History module does not have a user interface but it provides a filter to Views to show new or updated content. For more information, see the online documentation for the History module.', [':views-help' => (\Drupal::moduleHandler()->moduleExists('views')) ? \Drupal::url('help.page', ['name' => 'views']) : '#', ':url' => 'https://www.drupal.org/documentation/modules/history']) . '

'; return $output; } @@ -159,7 +160,7 @@ function history_node_delete(EntityInterface $node) { /** * Implements hook_user_cancel(). */ -function history_user_cancel($edit, $account, $method) { +function history_user_cancel($edit, UserInterface $account, $method) { switch ($method) { case 'user_cancel_reassign': db_delete('history')