Commit 56e257d5 authored by David_Rothstein's avatar David_Rothstein

Issue #1854134 by EtienneRd, jeffam | dolu: Added a query tag to the query in...

Issue #1854134 by EtienneRd, jeffam | dolu: Added a query tag to the query in menu_link_get_preferred() to allow modules to alter the query.
parent 433fe74a
Drupal 7.33, xxxx-xx-xx (development version) Drupal 7.33, xxxx-xx-xx (development version)
----------------------- -----------------------
- Added a "preferred_menu_links" tag to the database query that is used by
menu_link_get_preferred() to find the preferred menu link for a given path,
to make it easier to alter.
- Increased the maximum allowed length of block titles to 255 characters - Increased the maximum allowed length of block titles to 255 characters
(database schema change to the {block} table). (database schema change to the {block} table).
- Removed the Field module's field_modules_uninstalled() function, since it did - Removed the Field module's field_modules_uninstalled() function, since it did
......
...@@ -2495,6 +2495,7 @@ function menu_link_get_preferred($path = NULL, $selected_menu = NULL) { ...@@ -2495,6 +2495,7 @@ function menu_link_get_preferred($path = NULL, $selected_menu = NULL) {
$query->addField('ml', 'weight', 'link_weight'); $query->addField('ml', 'weight', 'link_weight');
$query->fields('m'); $query->fields('m');
$query->condition('ml.link_path', $path_candidates, 'IN'); $query->condition('ml.link_path', $path_candidates, 'IN');
$query->addTag('preferred_menu_links');
// Sort candidates by link path and menu name. // Sort candidates by link path and menu name.
$candidates = array(); $candidates = array();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment