What is $new_trail?

CommentFileSizeAuthor
#7 574862_D6.patch1.93 KBjhodgdon
#1 574862.patch1.94 KBjhodgdon
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Title: Documentation problem with menu_set_active_trail » menu_set_active_trail doc lacks details
FileSize
1.94 KB

Attached patch adds details to doc for menu_set_active_trail()

If accepted, this should also probably be ported to D6.

jhodgdon’s picture

Status: Active » Needs review
moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

Thanks.

Dries’s picture

Status: Reviewed & tested by the community » Fixed
+++ includes/menu.inc	30 Sep 2009 17:25:37 -0000
@@ -1772,7 +1772,25 @@
+ *   If $new_trail is supplied, the value is saved in a static variable and
+ *   returned. If $new_trail is not supplied, and there is a saved value from
+ *   a previous call, the saved value is returned. If $new_trail is not supplied
+ *   and there is no saved value, the path to the current page is calculated,
+ *   saved as the static value, and returned.

This seems to be a bit of a WTF but that is not the point of this patch.

Committed to CVS HEAD.

jhodgdon’s picture

Version: 7.x-dev » 6.x-dev
Status: Fixed » Patch (to be ported)

Still needs port to D6.

jhodgdon’s picture

And I somewhat agree on the WTF, but I thought the function doc ought to at least document what the function actually, currently does... :)

jhodgdon’s picture

Status: Patch (to be ported) » Reviewed & tested by the community
FileSize
1.93 KB

Here's a D6 version. Identical to D7 version, as the functions work the same.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed to Drupal 6 too.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.