Part of meta-issue #2002650: [meta, no patch] improve maintainability by removing unused local variables

File /core/modules/views/views.tokens.inc

Line 77: Unused local variable $langcode

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sergeypavlenko’s picture

Assigned: sergeypavlenko » Unassigned
Status: Active » Needs review
FileSize
0 bytes
sergeypavlenko’s picture

FileSize
514 bytes
victor-shelepen’s picture

Status: Needs review » Needs work

It is the empty patch file.

victor-shelepen’s picture

Status: Needs work » Needs review

Sorry. I am wrong.

victor-shelepen’s picture

Status: Needs review » Reviewed & tested by the community

Yes. The variable $language is unused.

webchick’s picture

Component: other » views.module
Status: Reviewed & tested by the community » Needs review
Issue tags: +VDC

Wonder if this is an oversight, though... Should that $langcode variable actually be getting passed into some of the code below?

Moving components and tagging VDC.

sergeypavlenko’s picture

The variable $langcode below in the code is not used. I think it should be removed.

webchick’s picture

Yes, I realize that. I'm asking whether that's actually a bug. :)

dawehner’s picture

I am not sure but can you actually translate something of description/label(admin)/title ... of a view?

andypost’s picture

Status: Needs review » Reviewed & tested by the community

Suppose we should get rid of all unused variables, as I know views uses config translation now

webchick’s picture

Status: Reviewed & tested by the community » Fixed

ok cool, just checking.

Committed and pushed to 8.x. Thanks!

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