? base_kill.patch
? base_url_kill_0.patch
Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.61
diff -u -F^f -r1.61 bootstrap.inc
--- includes/bootstrap.inc 22 Aug 2005 05:06:42 -0000 1.61
+++ includes/bootstrap.inc 22 Aug 2005 14:28:56 -0000
@@ -829,9 +829,11 @@ 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';
+ $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.470
diff -u -F^f -r1.470 common.inc
--- includes/common.inc 19 Aug 2005 11:10:35 -0000 1.470
+++ includes/common.inc 22 Aug 2005 14:28:57 -0000
@@ -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();
}
@@ -1574,7 +1573,7 @@ function form_clean_id($id = NULL) {
* alternative than url().
*/
function url($path = NULL, $query = NULL, $fragment = NULL, $absolute = FALSE) {
- global $base_url;
+ global $base_url, $base_url_path;
static $script;
@@ -1591,7 +1590,7 @@ function url($path = NULL, $query = NULL
$fragment = '#'. $fragment;
}
- $base = ($absolute ? $base_url .'/' : '');
+ $base = ($absolute ? $base_url . '/' : $base_url_path);
if (variable_get('clean_url', '0') == '0') {
if (isset($path)) {
@@ -1797,13 +1796,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;
}
}
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.254
diff -u -F^f -r1.254 theme.inc
--- includes/theme.inc 18 Aug 2005 22:07:14 -0000 1.254
+++ includes/theme.inc 22 Aug 2005 14:28:57 -0000
@@ -267,7 +267,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) {
@@ -285,11 +285,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'];
}
}
@@ -350,10 +351,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) {
$style = new stdClass();
- $style->path = $path;
+ $style->path = $base_url_path . $path;
$style->media = $media;
$styles[] = $style;
}
@@ -527,9 +530,11 @@ 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 '';
}
}
Index: themes/bluemarine/page.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/bluemarine/page.tpl.php,v
retrieving revision 1.8
diff -u -F^f -r1.8 page.tpl.php
--- themes/bluemarine/page.tpl.php 16 Aug 2005 18:06:18 -0000 1.8
+++ themes/bluemarine/page.tpl.php 22 Aug 2005 14:28:58 -0000
@@ -14,8 +14,8 @@
-
-
+
+
|
Index: themes/engines/phptemplate/phptemplate.engine
===================================================================
RCS file: /cvs/drupal/drupal/themes/engines/phptemplate/phptemplate.engine,v
retrieving revision 1.13
diff -u -F^f -r1.13 phptemplate.engine
--- themes/engines/phptemplate/phptemplate.engine 16 Aug 2005 18:06:18 -0000 1.13
+++ themes/engines/phptemplate/phptemplate.engine 22 Aug 2005 14:28:58 -0000
@@ -138,6 +138,7 @@ function phptemplate_features() {
* 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')) {
@@ -183,6 +184,7 @@ function phptemplate_page($content) {
}
$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.5
diff -u -F^f -r1.5 page.tpl.php
--- themes/pushbutton/page.tpl.php 16 Aug 2005 18:06:18 -0000 1.5
+++ themes/pushbutton/page.tpl.php 22 Aug 2005 14:28:58 -0000
@@ -16,7 +16,7 @@
-
+
|
@@ -24,7 +24,7 @@
-
+
|