security update core+modules

This commit is contained in:
Bachir Soussi Chiadmi
2015-04-26 18:38:56 +02:00
parent 2f45ea820a
commit 7c96373038
1022 changed files with 30319 additions and 11259 deletions

View File

@@ -5,35 +5,35 @@
*/
class context_reaction_breadcrumb extends context_reaction_menu {
/**
* Override of execute().
* Overrides set_active_trail_from_link to set the breadcrumb instead of the menu path.
*/
function execute(&$vars = NULL) {
if ($active_paths = $this->get_active_paths()) {
$breadcrumb = array(l(t('Home'), '<front>', array('purl' => array('disabled' => TRUE))));
foreach ($active_paths as $path) {
$result = db_select('menu_links')
->fields('menu_links', array('p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7', 'p8'))
->condition('hidden', 0)
->condition('link_path', $path)
->execute();
while ($parents = $result->fetchAssoc()) {
$set = FALSE;
foreach (array_filter($parents) as $plid) {
$parent = menu_link_load($plid);
if ($parent && $parent['access'] && empty($parent['hidden']) && !empty($parent['title'])) {
$set = TRUE;
$breadcrumb[] = l($parent['title'], $parent['href']);
}
}
// Only set the breadcrumb if one or more links were added to the
// trail. If not, continue iterating through possible menu links.
if ($set) {
drupal_set_breadcrumb($breadcrumb);
break;
}
function set_active_trail_from_link($item) {
$result = db_select('menu_links')
->fields('menu_links', array('p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7', 'p8'))
->condition('hidden', 0)
->condition('link_path', $item['link_path'])
->execute();
while ($parents = $result->fetchAssoc()) {
$set = FALSE;
foreach (array_filter($parents) as $plid) {
$parent = menu_link_load($plid);
if ($parent && $parent['access'] && empty($parent['hidden']) && !empty($parent['title'])) {
$set = TRUE;
$breadcrumb[] = l($parent['title'], $parent['href']);
}
}
// Only set the breadcrumb if one or more links were added to the
// trail. If not, continue iterating through possible menu links.
if ($set) {
drupal_set_breadcrumb($breadcrumb);
break;
}
}
}
/**
* Return the title to be used for the current menu item.
*/
function get_link_title($item) {
return module_exists('i18n_menu') ? _i18n_menu_link_title($item) : $item['title'];
}
}