Issue #2062353 by sergeypavlenko: Remove calls to deprecated global in translation module.

8.0.x
webchick 2013-08-29 09:10:54 -07:00
parent 542517f649
commit 7a88ed3bb9
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ function translation_node_create_access($account) {
function translation_user_can_translate_node($node, $account = NULL) {
// If no user object is supplied, the access check is for the current user.
if (empty($account)) {
$account = $GLOBALS['user'];
$account = Drupal::currentUser();
}
return node_access('view', $node, $account) && (user_access('translate all content', $account) || ($node->getAuthorId() == $account->id() && user_access('translate own content', $account)));
}