applied security contrib modules updates

didn't repatched view module, keep it in mind, may be necessary
This commit is contained in:
Bachir Soussi Chiadmi
2017-05-24 19:02:39 +02:00
parent 28c7a0965a
commit dbd7b88639
137 changed files with 5455 additions and 843 deletions

View File

@@ -105,17 +105,7 @@ function title_field_replacement_info($entity_type, $legacy_field = NULL) {
}
/**
* Return an entity label value.
*
* @param $entity
* The entity whose label has to be displayed.
* @param $type
* The name of the entity type.
* @param $langcode
* (Optional) The language the entity label has to be displayed in.
*
* @return
* The entity label as a string value.
* Implements callback_entity_info_label().
*/
function title_entity_label($entity, $type, $langcode = NULL) {
$entity_info = entity_get_info($type);
@@ -754,6 +744,7 @@ function title_tokens_alter(array &$replacements, array $context) {
$entity = $context['data'][$context['type']];
list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
$options = $context['options'];
$sanitize = !empty($options['sanitize']);
// Since Title tokens are mostly used in storage contexts we default to
// the current working language, that is the entity language. Modules
@@ -766,13 +757,10 @@ function title_tokens_alter(array &$replacements, array $context) {
if (title_field_replacement_enabled($entity_type, $bundle, $legacy_field)) {
if (isset($context['tokens'][$legacy_field])) {
$langcode = field_language($entity_type, $entity, $info['field']['field_name'], $langcode);
$values = $info['callbacks']['sync_get']($entity_type, $entity, $legacy_field, $info, $langcode);
$item = $values[$legacy_field];
$item = $info['callbacks']['sync_get']($entity_type, $entity, $legacy_field, $info, $langcode);
if (!empty($item)) {
if (is_array($item)) {
$item = reset($item);
}
$replacements[$context['tokens'][$legacy_field]] = $item;
list($value, $format) = array_values($item);
$replacements[$context['tokens'][$legacy_field]] = check_markup($value, $format, $langcode);
}
}
}