summaryrefslogtreecommitdiff
path: root/includes/menu.inc
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-11-23 06:00:27 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-11-23 06:00:27 +0000
commit6cacff4b4e4494c05f90604849dc8803c7506ae0 (patch)
tree8798ed29de067d35d5a7158eb2a718c817ddd362 /includes/menu.inc
parente19a50d23f2942b4a22c69e5d2e57a1c02f682f8 (diff)
downloadbrdo-6cacff4b4e4494c05f90604849dc8803c7506ae0.tar.gz
brdo-6cacff4b4e4494c05f90604849dc8803c7506ae0.tar.bz2
#298561 by Steven, chx, mcarbone, pwolanin: Fixed slashes don't work in search
Diffstat (limited to 'includes/menu.inc')
-rw-r--r--includes/menu.inc20
1 files changed, 20 insertions, 0 deletions
diff --git a/includes/menu.inc b/includes/menu.inc
index e3adaaf3e..b19abdbb4 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -787,11 +787,31 @@ function _menu_link_map_translate(&$map, $to_arg_functions) {
}
}
+/**
+ * Returns path as one string from the argument we are currently at.
+ */
function menu_tail_to_arg($arg, $map, $index) {
return implode('/', array_slice($map, $index));
}
/**
+ * Loads path as one string from the argument we are currently at.
+ *
+ * To use this load function, you must specify the load arguments
+ * in the router item as:
+ * @code
+ * $item['load arguments'] = array('%map', '%index');
+ * @endcode
+ *
+ * @see search_menu().
+ */
+function menu_tail_load($arg, &$map, $index) {
+ $arg = implode('/', array_slice($map, $index));
+ $map = array_slice($map, 0, $index);
+ return $arg;
+}
+
+/**
* This function is similar to _menu_translate() but does link-specific
* preparation such as always calling to_arg functions
*