diff options
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc index c2b1d5914..00f497d4e 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -1934,14 +1934,20 @@ function drupal_add_js($data = NULL, $type = 'module', $scope = 'header', $defer if (isset($data)) { - // Add jquery.js and drupal.js the first time a Javascript file is added. + // Add jquery.js and drupal.js, as well as the basePath setting, the + // first time a Javascript file is added. if (empty($javascript)) { $javascript['header'] = array( 'core' => array( 'misc/jquery.js' => array('cache' => TRUE, 'defer' => FALSE, 'preprocess' => TRUE), 'misc/drupal.js' => array('cache' => TRUE, 'defer' => FALSE, 'preprocess' => TRUE), ), - 'module' => array(), 'theme' => array(), 'setting' => array(), 'inline' => array(), + 'module' => array(), + 'theme' => array(), + 'setting' => array( + array('basePath' => base_path()), + ), + 'inline' => array(), ); } |