Index: includes/bootstrap.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v retrieving revision 1.70 diff -u -r1.70 bootstrap.inc --- includes/bootstrap.inc 22 Oct 2005 15:14:46 -0000 1.70 +++ includes/bootstrap.inc 14 Nov 2005 16:57:09 -0000 @@ -846,9 +846,11 @@ switch ($phase) { case DRUPAL_BOOTSTRAP_DATABASE: - global $db_url, $db_prefix, $base_url; + global $db_url, $db_prefix, $base_url, $base_url_path; $conf = array(); require_once conf_init() .'/settings.php'; + $parts = parse_url($base_url); + $base_url_path = (isset($parts['path']) ? $parts['path'] . '/' : '/'); require_once './includes/database.inc'; // Initialize the default database. db_set_active(); Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.491 diff -u -r1.491 common.inc --- includes/common.inc 28 Oct 2005 01:06:36 -0000 1.491 +++ includes/common.inc 14 Nov 2005 16:57:09 -0000 @@ -114,11 +114,10 @@ * Retrieve output to be displayed in the head tag of the HTML page. */ function drupal_get_html_head() { - global $base_url; + global $base_url_path; $output = "\n"; - $output .= "\n"; - $output .= theme('stylesheet_import', 'misc/drupal.css'); + $output .= theme('stylesheet_import', $base_url_path .'misc/drupal.css'); return $output . drupal_set_html_head(); } @@ -998,7 +997,7 @@ * alternative than url(). */ function url($path = NULL, $query = NULL, $fragment = NULL, $absolute = FALSE) { - global $base_url; + global $base_url, $base_url_path; static $script; @@ -1015,7 +1014,7 @@ $fragment = '#'. $fragment; } - $base = ($absolute ? $base_url .'/' : ''); + $base = ($absolute ? $base_url . '/' : $base_url_path); if (variable_get('clean_url', '0') == '0') { if (isset($path)) { @@ -1221,13 +1220,15 @@ * depends on the 'killswitch' inside it. */ function drupal_add_js($file) { + global $base_url_path; static $sent = array(); + if (!isset($sent['misc/drupal.js'])) { - drupal_set_html_head(''); + drupal_set_html_head(''); $sent['misc/drupal.js'] = true; } if (!isset($sent[$file])) { - drupal_set_html_head(''); + drupal_set_html_head(''); $sent[$file] = true; } } Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.264 diff -u -r1.264 theme.inc --- includes/theme.inc 3 Nov 2005 19:33:37 -0000 1.264 +++ includes/theme.inc 14 Nov 2005 16:57:10 -0000 @@ -263,7 +263,7 @@ * The value of the requested setting, NULL if the setting does not exist. */ function theme_get_setting($setting_name, $refresh = FALSE) { - global $theme_key; + global $theme_key, $base_url_path; static $settings; if (empty($settings) || $refresh) { @@ -281,11 +281,12 @@ } if ($settings['toggle_logo']) { + $settings['logo'] = $base_url_path; if ($settings['default_logo']) { - $settings['logo'] = dirname($theme_object->filename) .'/logo.png'; + $settings['logo'] .= dirname($theme_object->filename) .'/logo.png'; } elseif ($settings['logo_path']) { - $settings['logo'] = $settings['logo_path']; + $settings['logo'] .= $settings['logo_path']; } } @@ -313,10 +314,12 @@ * drupal_set_html_head() to enforce the correct CSS cascading order. */ function theme_add_style($path = '', $media = 'all') { + global $base_url_path; static $styles = array(); + if ($path) { $style = new stdClass(); - $style->path = $path; + $style->path = $base_url_path . $path; $style->media = $media; $styles[] = $style; } @@ -493,9 +496,11 @@ * A string containing the image tag. */ function theme_image($path, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE) { + global $base_url_path; + if (!$getsize || (is_file($path) && (list($width, $height, $type, $image_attributes) = @getimagesize($path)))) { $attributes = drupal_attributes($attributes); - return ''. check_plain($alt) .''; + return ''. check_plain($alt) .''; } } Index: themes/bluemarine/page.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/themes/bluemarine/page.tpl.php,v retrieving revision 1.13 diff -u -r1.13 page.tpl.php --- themes/bluemarine/page.tpl.php 4 Nov 2005 08:17:22 -0000 1.13 +++ themes/bluemarine/page.tpl.php 14 Nov 2005 16:57:10 -0000 @@ -13,8 +13,11 @@ Index: themes/engines/phptemplate/phptemplate.engine =================================================================== RCS file: /cvs/drupal/drupal/themes/engines/phptemplate/phptemplate.engine,v retrieving revision 1.22 diff -u -r1.22 phptemplate.engine --- themes/engines/phptemplate/phptemplate.engine 3 Nov 2005 19:40:36 -0000 1.22 +++ themes/engines/phptemplate/phptemplate.engine 14 Nov 2005 16:57:10 -0000 @@ -140,6 +140,7 @@ * into a pluggable template engine. */ function phptemplate_page($content) { + global $base_url_path; /* Set title and breadcrumb to declared values */ if ($_GET['q'] == variable_get('site_frontpage', 'node')) { @@ -185,6 +186,7 @@ } $variables = array( + 'base_url_path' => $base_url_path, 'breadcrumb' => theme('breadcrumb', drupal_get_breadcrumb()), 'closure' => theme('closure'), 'content' => '' . $content . '', Index: themes/pushbutton/page.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/themes/pushbutton/page.tpl.php,v retrieving revision 1.8 diff -u -r1.8 page.tpl.php --- themes/pushbutton/page.tpl.php 4 Nov 2005 08:17:22 -0000 1.8 +++ themes/pushbutton/page.tpl.php 14 Nov 2005 16:57:10 -0000 @@ -16,7 +16,7 @@ @@ -24,7 +24,7 @@