fix menu paths when mod_rewrite is not available
This commit is contained in:
parent
44264836be
commit
911791b362
@ -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');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user