security update core+modules
This commit is contained in:
@@ -140,7 +140,7 @@ function taxonomy_entity_info() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Entity URI callback.
|
||||
* Implements callback_entity_info_uri().
|
||||
*/
|
||||
function taxonomy_term_uri($term) {
|
||||
return array(
|
||||
@@ -457,7 +457,12 @@ function taxonomy_vocabulary_save($vocabulary) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a vocabulary.
|
||||
* Deletes a vocabulary.
|
||||
*
|
||||
* This will update all Taxonomy fields so that they don't reference the
|
||||
* deleted vocabulary. It also will delete fields that have no remaining
|
||||
* vocabulary references. All taxonomy terms of the deleted vocabulary
|
||||
* will be deleted as well.
|
||||
*
|
||||
* @param $vid
|
||||
* A vocabulary ID.
|
||||
@@ -748,7 +753,7 @@ function taxonomy_term_delete($tid) {
|
||||
* @param term
|
||||
* A taxonomy term object.
|
||||
* @return
|
||||
* A $page element suitable for use by drupal_page_render().
|
||||
* A $page element suitable for use by drupal_render().
|
||||
*/
|
||||
function taxonomy_term_show($term) {
|
||||
return taxonomy_term_view_multiple(array($term->tid => $term), 'full');
|
||||
@@ -771,15 +776,26 @@ function taxonomy_term_show($term) {
|
||||
* An array in the format expected by drupal_render().
|
||||
*/
|
||||
function taxonomy_term_view_multiple($terms, $view_mode = 'teaser', $weight = 0, $langcode = NULL) {
|
||||
field_attach_prepare_view('taxonomy_term', $terms, $view_mode, $langcode);
|
||||
entity_prepare_view('taxonomy_term', $terms, $langcode);
|
||||
$build = array();
|
||||
$entities_by_view_mode = entity_view_mode_prepare('taxonomy_term', $terms, $view_mode, $langcode);
|
||||
foreach ($entities_by_view_mode as $entity_view_mode => $entities) {
|
||||
field_attach_prepare_view('taxonomy_term', $entities, $entity_view_mode, $langcode);
|
||||
entity_prepare_view('taxonomy_term', $entities, $langcode);
|
||||
|
||||
foreach ($entities as $entity) {
|
||||
$build['taxonomy_terms'][$entity->tid] = taxonomy_term_view($entity, $entity_view_mode, $langcode);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($terms as $term) {
|
||||
$build['taxonomy_terms'][$term->tid] = taxonomy_term_view($term, $view_mode, $langcode);
|
||||
$build['taxonomy_terms'][$term->tid]['#weight'] = $weight;
|
||||
$weight++;
|
||||
}
|
||||
// Sort here, to preserve the input order of the entities that were passed to
|
||||
// this function.
|
||||
uasort($build['taxonomy_terms'], 'element_sort');
|
||||
$build['taxonomy_terms']['#sorted'] = TRUE;
|
||||
|
||||
return $build;
|
||||
}
|
||||
|
||||
@@ -812,12 +828,7 @@ function taxonomy_term_build_content($term, $view_mode = 'full', $langcode = NUL
|
||||
$term->content = array();
|
||||
|
||||
// Allow modules to change the view mode.
|
||||
$context = array(
|
||||
'entity_type' => 'taxonomy_term',
|
||||
'entity' => $term,
|
||||
'langcode' => $langcode,
|
||||
);
|
||||
drupal_alter('entity_view_mode', $view_mode, $context);
|
||||
$view_mode = key(entity_view_mode_prepare('taxonomy_term', array($term->tid => $term), $view_mode, $langcode));
|
||||
|
||||
// Add the term description if the term has one and it is visible.
|
||||
$type = 'taxonomy_term';
|
||||
|
||||
Reference in New Issue
Block a user