diff --git a/subpath_alias.module b/subpath_alias.module index da22a3d..6099a74 100644 --- a/subpath_alias.module +++ b/subpath_alias.module @@ -42,6 +42,12 @@ function subpath_alias_url_inbound_alter(&$path, $original_path, $path_language) return; } + // Special case for menu hooks loaded by other modules (like views) + if (db_result(db_query("SELECT path FROM {menu_router} WHERE path = '%s'", $path))) { + $cache['map'][$path_language][$path] = $path; + return; + } + // Build a list of sub-paths to look up, excluding known not-existing // sub-paths and the full path, which has already been checked by // drupal_lookup_path(). @@ -55,7 +61,7 @@ function subpath_alias_url_inbound_alter(&$path, $original_path, $path_language) $args[] = $subpath; } } - + if ($args) { // Query the database for any of the sub-paths, preferring the longest // match.