Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Garbar’s picture

Assigned: Unassigned » Garbar
Status: Active » Needs review
FileSize
851 bytes

need reviews

Wim Leers’s picture

Status: Needs review » Reviewed & tested by the community

Great — thanks! :)

catch’s picture

Status: Reviewed & tested by the community » Needs work
Wim Leers’s picture

Status: Needs work » Postponed
Wim Leers’s picture

Title: Remove calls to deprecated global $user in editor module » Remove calls to deprecated global $user in favor of current user service in editor module
Status: Postponed » Active

Garbar, #2062151: Create a current user service to ensure that current account is always available was finished and committed two days ago. Would you like to pick this up again? :)

Wim Leers’s picture

Issue tags: +php-novice

.

m1r1k’s picture

andypost’s picture

Status: Needs review » Reviewed & tested by the community

Looks nice to go

+++ b/core/modules/editor/lib/Drupal/editor/Plugin/InPlaceEditor/Editor.php
@@ -68,7 +68,7 @@ protected function textFormatHasTransformationFilters($format_id) {
+    $user = \Drupal::currentUser();
...
     $manager = \Drupal::service('plugin.manager.editor');

Not sure why the dependencies are not injected here but it was before the patch

Wim Leers’s picture

This class is from before the proper interfaces for that were finalized IIRC. I'd like to see the conversion happening here, but you're right, that's out of scope for this particular issue.

RTBC+1

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 51811d8 and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.