summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/menu.inc9
1 files changed, 6 insertions, 3 deletions
diff --git a/includes/menu.inc b/includes/menu.inc
index 39f7dddad..8c2255067 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -3166,12 +3166,15 @@ function _menu_router_build($callbacks) {
if (!isset($item['page arguments']) && isset($parent['page arguments'])) {
$item['page arguments'] = $parent['page arguments'];
}
- if (!isset($item['file']) && isset($parent['file'])) {
- $item['file'] = $parent['file'];
- }
if (!isset($item['file path']) && isset($parent['file path'])) {
$item['file path'] = $parent['file path'];
}
+ if (!isset($item['file']) && isset($parent['file'])) {
+ $item['file'] = $parent['file'];
+ if (empty($item['file path']) && isset($item['module']) && isset($parent['module']) && $item['module'] != $parent['module']) {
+ $item['file path'] = drupal_get_path('module', $parent['module']);
+ }
+ }
}
// Same for delivery callbacks.
if (!isset($item['delivery callback']) && isset($parent['delivery callback'])) {