Update to Drupal 8.0.0-beta15. For more information, see: https://www.drupal.org/node/2563023
This commit is contained in:
parent
2720a9ec4b
commit
f3791f1da3
1898 changed files with 54300 additions and 11481 deletions
|
@ -5,7 +5,6 @@
|
|||
* User page callbacks for tracker.module.
|
||||
*/
|
||||
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
use Drupal\Core\Cache\Cache;
|
||||
use Drupal\node\Entity\Node;
|
||||
|
||||
|
@ -85,7 +84,7 @@ function tracker_page($account = NULL) {
|
|||
}
|
||||
|
||||
$row = array(
|
||||
'type' => SafeMarkup::checkPlain(node_get_type_label($node)),
|
||||
'type' => node_get_type_label($node),
|
||||
'title' => array(
|
||||
'data' => array(
|
||||
'#type' => 'link',
|
||||
|
@ -140,8 +139,13 @@ function tracker_page($account = NULL) {
|
|||
$page['#cache']['tags'] = $cache_tags;
|
||||
$page['#cache']['contexts'][] = 'user.node_grants:view';
|
||||
|
||||
if (Drupal::moduleHandler()->moduleExists('history') && \Drupal::currentUser()->isAuthenticated()) {
|
||||
$page['#attached']['library'][] = 'tracker/history';
|
||||
// Display the reading history if that module is enabled.
|
||||
if (\Drupal::moduleHandler()->moduleExists('history')) {
|
||||
// Reading history is tracked for authenticated users only.
|
||||
if (\Drupal::currentUser()->isAuthenticated()) {
|
||||
$page['#attached']['library'][] = 'tracker/history';
|
||||
}
|
||||
$page['#cache']['contexts'][] = 'user.roles:authenticated';
|
||||
}
|
||||
|
||||
return $page;
|
||||
|
|
Reference in a new issue