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 '';
+ return '';
}
}
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 @@