From 911791b362986dd7bca2c8635f8e00b7176f952b Mon Sep 17 00:00:00 2001 From: Ted Serbinski Date: Sat, 18 Nov 2006 01:22:58 +0000 Subject: [PATCH] fix menu paths when mod_rewrite is not available --- simplemenu.module | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/simplemenu.module b/simplemenu.module index 6b83d600..6c5c0b2d 100644 --- a/simplemenu.module +++ b/simplemenu.module @@ -30,14 +30,14 @@ function menu_bar_menu($may_cache) { ); } + // We put this in !$may_cache so it's only added once per request elseif (user_access('view menu bar')) { $path = drupal_get_path('module', 'menu_bar'); - // Add the CSS for this module - // We put this in !$may_cache so it's only added once per request drupal_add_css($path .'/menu_bar.css'); // pass in base path to the JS file - drupal_add_js(array('menu_bar' => array('basePath' => base_path())), 'setting'); + // url() handles appending ?q= but in this case, we need to pass in the variable so the menus work when mod_rewrite is off + drupal_add_js(array('menu_bar' => array('basePath' => base_path() . (variable_get('clean_url', 0) ? '' : '?q='))), 'setting'); drupal_add_js($path .'/menu_bar.js'); }