summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Catchpole2014-01-01 20:53:26 (GMT)
committerNathaniel Catchpole2014-01-01 20:53:26 (GMT)
commit8d1f9b8df70bcea1cf76aee277cdb391e1b6884a (patch)
tree59cb6c5bbfc9eaf011abd6ec77e740034edc34d6
parent0146bc72a84f6de89b8c881e4c19bb5bd1fd897e (diff)
Issue #2078057 by m1r1k, joelpittet, areke: Remove references to global in Content Translation module.
-rw-r--r--core/modules/content_translation/content_translation.module2
-rw-r--r--core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationSyncImageTest.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module
index 39925c4..7618840 100644
--- a/core/modules/content_translation/content_translation.module
+++ b/core/modules/content_translation/content_translation.module
@@ -713,7 +713,7 @@ function content_translation_entity_insert(EntityInterface $entity) {
$translation += array(
'source' => '',
- 'uid' => $GLOBALS['user']->id(),
+ 'uid' => \Drupal::currentUser()->id(),
'outdated' => FALSE,
'status' => TRUE,
'created' => REQUEST_TIME,
diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationSyncImageTest.php b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationSyncImageTest.php
index f974837..baf99d8 100644
--- a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationSyncImageTest.php
+++ b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationSyncImageTest.php
@@ -144,7 +144,7 @@ class ContentTranslationSyncImageTest extends ContentTranslationTestBase {
// identifier.
$field_values = array(
'uri' => $this->files[$index]->uri,
- 'uid' => $GLOBALS['user']->id(),
+ 'uid' => \Drupal::currentUser()->id(),
'status' => FILE_STATUS_PERMANENT,
);
$file = entity_create('file', $field_values);