Projet

Général

Profil

Révision c0bac9d6

Ajouté par Assos Assos il y a presque 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/file_entity/file_entity.file_api.inc
257 257
    }
258 258
  }
259 259

  
260
  // Since $file->alt and $file->title were set in file_entity_file_load()
261
  // (which is a language-agnostic hook) they will not be in the correct
262
  // language if the file is being displayed in a language other than the
263
  // default one. Set them again here, using the correct language. This must
264
  // run after hook_file_displays_alter() since the Media module sets
265
  // $file->alt and $file->title again during that hook.
266
  if ($langcode != $GLOBALS['language_content']->language) {
267
    $languages = language_list();
268
    if (isset($languages[$langcode])) {
269
      $replace_options = array(
270
        'language' => $languages[$langcode],
271
      );
272
      $file->title = file_entity_replace_title($file, $replace_options);
273
      $file->alt = file_entity_replace_alt($file, $replace_options);
274
    }
275
  }
276

  
260 277
  // Attempt to display the file with each of the possible displays. Stop after
261 278
  // the first successful one. See file_displays() for details.
262 279
  $element = NULL;

Formats disponibles : Unified diff