Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.68
diff -u -r1.68 bootstrap.inc
--- includes/bootstrap.inc 19 Sep 2005 19:13:35 -0000 1.68
+++ includes/bootstrap.inc 9 Oct 2005 05:37:11 -0000
@@ -826,9 +826,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.484
diff -u -r1.484 common.inc
--- includes/common.inc 8 Oct 2005 12:38:20 -0000 1.484
+++ includes/common.inc 9 Oct 2005 05:37:12 -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.261
diff -u -r1.261 theme.inc
--- includes/theme.inc 7 Oct 2005 06:09:13 -0000 1.261
+++ includes/theme.inc 9 Oct 2005 05:37:12 -0000
@@ -267,7 +267,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) {
@@ -285,11 +285,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'];
}
}
@@ -350,10 +351,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;
}
@@ -527,9 +530,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 '';
+ return '';
}
}
Index: themes/bluemarine/page.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/bluemarine/page.tpl.php,v
retrieving revision 1.11
diff -u -r1.11 page.tpl.php
--- themes/bluemarine/page.tpl.php 7 Oct 2005 06:51:43 -0000 1.11
+++ themes/bluemarine/page.tpl.php 9 Oct 2005 05:37:12 -0000
@@ -13,8 +13,11 @@