Projet

Général

Profil

Révision d1c64ea8

Ajouté par Assos Assos il y a plus de 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/file_entity/file_entity.file_api.inc
241 241
  drupal_alter('file_displays', $displays, $file, $view_mode);
242 242
  _file_sort_array_by_weight($displays);
243 243

  
244
  // Since $file->alt and $file->title were set in file_entity_file_load()
245
  // (which is a language-agnostic hook) they will not be in the correct
246
  // language if the file is being displayed in a language other than the
247
  // default one. Set them again here, using the correct language. This must
248
  // run after hook_file_displays_alter() since the Media module sets
249
  // $file->alt and $file->title again during that hook.
250
  if ($langcode != $GLOBALS['language_content']->language) {
251
    $languages = language_list();
252
    if (isset($languages[$langcode])) {
253
      file_entity_set_title_alt_properties(array($file), $languages[$langcode]);
254
    }
255
  }
256

  
244 257
  // Attempt to display the file with each of the possible displays. Stop after
245 258
  // the first successful one. See file_displays() for details.
246 259
  $element = NULL;

Formats disponibles : Unified diff