=== modified file 'includes/bootstrap.inc'
--- includes/bootstrap.inc
+++ includes/bootstrap.inc
@@ -678,11 +678,13 @@ function _drupal_bootstrap($phase) {
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';
require_once './includes/database.inc';
// Initialize the default database.
+ $parts = parse_url($base_url);
+ $base_url_path = (isset($parts['path']) ? $parts['path'] . '/' : '/');
db_set_active();
break;
=== modified file 'includes/common.inc'
--- includes/common.inc
+++ includes/common.inc
@@ -114,11 +114,10 @@ function drupal_set_html_head($data = NU
* 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();
}
@@ -919,7 +918,7 @@ function url($path = NULL, $query = NULL
return $path . $fragment;
}
- global $base_url;
+ global $base_url, $base_url_path;
static $script;
static $clean_url;
@@ -935,7 +934,7 @@ function url($path = NULL, $query = NULL
$clean_url = (bool)variable_get('clean_url', '0');
}
- $base = ($absolute ? $base_url .'/' : '');
+ $base = ($absolute ? $base_url . '/' : $base_url_path);
// The special path '' links to the default front page.
if (isset($path) && $path != '') {
@@ -1134,13 +1133,15 @@ function drupal_add_link($attributes) {
* 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;
}
}
=== modified file 'includes/theme.inc'
--- includes/theme.inc
+++ includes/theme.inc
@@ -280,7 +280,7 @@ function theme_get_settings($key = NULL)
* 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) {
@@ -298,11 +298,12 @@ function theme_get_setting($setting_name
}
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'];
}
}
@@ -330,10 +331,12 @@ function theme_get_setting($setting_name
* 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 && !isset($styles["$media:$path"])) {
$style = new stdClass();
- $style->path = $path;
+ $style->path = $base_url_path. $path;
$style->media = $media;
$styles["$media:$path"] = $style;
}
@@ -511,9 +514,10 @@ function theme_links($links, $delimiter
* 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 '';
}
}
=== modified file 'themes/bluemarine/page.tpl.php'
--- themes/bluemarine/page.tpl.php
+++ themes/bluemarine/page.tpl.php
@@ -13,8 +13,11 @@