Problem/Motivation

When called from the Entity API's entity_view(), file_view_multiple() has parameters in an unexpected order. The $langcode parameter is actually the entity type ("file") and the $weight parameter is the true langcode. This means the langcode is lost when files are viewed using entity_view().

Proposed resolution

Rather than change the API's of entity or file_entity, add a simple check for this discrepancy, and fix it.

Remaining tasks

Review the attached patch.

User interface changes

None.

API changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

brockfanning’s picture

Status: Active » Needs review
FileSize
704 bytes
Dave Reid’s picture

Status: Needs review » Postponed (maintainer needs more info)
brockfanning’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Yes, that handles it nicely! Sorry about that. For some reason I thought I was testing the dev version, but apparently was not.