summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2014-11-02 15:15:07 -0500
committerDavid Rothstein <drothstein@gmail.com>2014-11-02 15:15:07 -0500
commit56e257d57db9de0a1d874e3fd3c1a259d824968f (patch)
tree4a44abfd29fadb637a70ac980d8e6193d3c81806
parent433fe74a8181189fc825d5d4ae43216c6eed71f2 (diff)
downloadbrdo-56e257d57db9de0a1d874e3fd3c1a259d824968f.tar.gz
brdo-56e257d57db9de0a1d874e3fd3c1a259d824968f.tar.bz2
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.
-rw-r--r--CHANGELOG.txt3
-rw-r--r--includes/menu.inc1
2 files changed, 4 insertions, 0 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 0b3bd6216..01578d4cf 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,6 +1,9 @@
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
(database schema change to the {block} table).
- Removed the Field module's field_modules_uninstalled() function, since it did
diff --git a/includes/menu.inc b/includes/menu.inc
index fa5a71e73..2bfa39f66 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -2495,6 +2495,7 @@ function menu_link_get_preferred($path = NULL, $selected_menu = NULL) {
$query->addField('ml', 'weight', 'link_weight');
$query->fields('m');
$query->condition('ml.link_path', $path_candidates, 'IN');
+ $query->addTag('preferred_menu_links');
// Sort candidates by link path and menu name.
$candidates = array();