uppdated modules

This commit is contained in:
Bachir Soussi Chiadmi
2017-01-22 16:19:36 +01:00
parent 03be8f82aa
commit 8416e3eea1
748 changed files with 32317 additions and 20900 deletions
@@ -80,9 +80,12 @@ function template_preprocess_entity_property(&$variables, $hook) {
);
// Populate the content with sensible defaults.
if (!isset($variables['content'])) {
if (!isset($element['#content'])) {
$variables['content'] = entity_property_default_render_value_by_type($element['#entity_wrapped']->{$element['#property_name']});
}
else {
$variables['content'] = $element['#content'];
}
}
/**
@@ -169,7 +172,7 @@ function template_preprocess_entity(&$variables) {
$variables['title'] = check_plain(entity_label($entity_type, $entity));
$uri = entity_uri($entity_type, $entity);
$variables['url'] = $uri ? url($uri['path'], $uri['options']) : FALSE;
$variables['url'] = $uri && !empty($uri['path']) ? url($uri['path'], $uri['options']) : FALSE;
if (isset($variables['elements']['#page'])) {
// If set by the caller, respect the page property.
@@ -177,7 +180,7 @@ function template_preprocess_entity(&$variables) {
}
else {
// Else, try to automatically detect it.
$variables['page'] = $uri && $uri['path'] == $_GET['q'];
$variables['page'] = $uri && !empty($uri['path']) && $uri['path'] == $_GET['q'];
}
// Helpful $content variable for templates.