Index: includes/bootstrap.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v retrieving revision 1.466 diff -u -p -r1.466 bootstrap.inc --- includes/bootstrap.inc 19 Feb 2011 16:59:43 -0000 1.466 +++ includes/bootstrap.inc 21 Feb 2011 02:11:14 -0000 @@ -930,7 +930,7 @@ function drupal_load($type, $name) { $filename = drupal_get_filename($type, $name); if ($filename) { - include_once DRUPAL_ROOT . '/' . $filename; + include_once $filename; $files[$type][$name] = TRUE; return TRUE; @@ -2659,7 +2659,7 @@ function _registry_check_code($type, $na $cache_key = $type[0] . $name; if (isset($lookup_cache[$cache_key])) { if ($lookup_cache[$cache_key]) { - require_once DRUPAL_ROOT . '/' . $lookup_cache[$cache_key]; + require_once $lookup_cache[$cache_key]; } return (bool) $lookup_cache[$cache_key]; } @@ -2681,7 +2681,7 @@ function _registry_check_code($type, $na $lookup_cache[$cache_key] = $file; if ($file) { - require_once DRUPAL_ROOT . '/' . $file; + require_once $file; return TRUE; } else { Index: includes/file.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/file.inc,v retrieving revision 1.243 diff -u -p -r1.243 file.inc --- includes/file.inc 15 Dec 2010 03:39:41 -0000 1.243 +++ includes/file.inc 21 Feb 2011 02:11:15 -0000 @@ -280,17 +280,21 @@ function file_default_scheme() { */ function file_stream_wrapper_uri_normalize($uri) { $scheme = file_uri_scheme($uri); - - if ($scheme && file_stream_wrapper_valid_scheme($scheme)) { - $target = file_uri_target($uri); - - if ($target !== FALSE) { - $uri = $scheme . '://' . $target; + if ($scheme) { + if (file_stream_wrapper_valid_scheme($scheme)) { + $target = file_uri_target($uri); + if ($target !== FALSE) { + $uri = $scheme . '://' . $target; + } } } - else { + elseif (strpos($uri, '/') === 0) { // The default scheme is file:// - $url = 'file://' . $uri; + $uri = 'file://' . $uri; + } + else { + // Prepend relative path with root path. + $uri = 'file://' . DRUPAL_ROOT . '/' . $uri; } return $uri; } @@ -407,6 +411,9 @@ function file_create_url($uri) { // the http wrapper. return $uri; } + elseif ($scheme == 'file') { + return $GLOBALS['base_url'] . substr($uri, strlen('file://' . DRUPAL_ROOT)); + } else { // Attempt to return an external URL using the appropriate wrapper. if ($wrapper = file_stream_wrapper_get_instance_by_uri($uri)) { Index: includes/install.core.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/install.core.inc,v retrieving revision 1.49 diff -u -p -r1.49 install.core.inc --- includes/install.core.inc 3 Jan 2011 15:48:11 -0000 1.49 +++ includes/install.core.inc 21 Feb 2011 02:11:15 -0000 @@ -1063,7 +1063,7 @@ function install_select_profile_form($fo foreach ($profile_files as $profile) { // TODO: is this right? - include_once DRUPAL_ROOT . '/' . $profile->uri; + include_once $profile->uri; $details = install_profile_info($profile->name); // Don't show hidden profiles. This is used by to hide the testing profile, Index: includes/install.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/install.inc,v retrieving revision 1.153 diff -u -p -r1.153 install.inc --- includes/install.inc 19 Feb 2011 00:50:43 -0000 1.153 +++ includes/install.inc 21 Feb 2011 02:11:15 -0000 @@ -714,7 +714,7 @@ function drupal_verify_profile($install_ */ function drupal_install_system() { $system_path = drupal_get_path('module', 'system'); - require_once DRUPAL_ROOT . '/' . $system_path . '/system.install'; + require_once $system_path . '/system.install'; module_invoke('system', 'install'); $system_versions = drupal_get_schema_versions('system'); Index: includes/menu.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/menu.inc,v retrieving revision 1.431 diff -u -p -r1.431 menu.inc --- includes/menu.inc 4 Jan 2011 06:20:30 -0000 1.431 +++ includes/menu.inc 21 Feb 2011 02:11:15 -0000 @@ -496,7 +496,7 @@ function menu_execute_active_handler($pa if ($router_item = menu_get_item($path)) { if ($router_item['access']) { if ($router_item['include_file']) { - require_once DRUPAL_ROOT . '/' . $router_item['include_file']; + require_once $router_item['include_file']; } $page_callback_result = call_user_func_array($router_item['page_callback'], $router_item['page_arguments']); } Index: includes/module.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/module.inc,v retrieving revision 1.210 diff -u -p -r1.210 module.inc --- includes/module.inc 4 Feb 2011 19:34:38 -0000 1.210 +++ includes/module.inc 21 Feb 2011 02:11:15 -0000 @@ -295,7 +295,7 @@ function module_load_include($type, $mod } if (function_exists('drupal_get_path')) { - $file = DRUPAL_ROOT . '/' . drupal_get_path('module', $module) . "/$name.$type"; + $file = drupal_get_path('module', $module) . "/$name.$type"; if (is_file($file)) { require_once $file; return $file; Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.630 diff -u -p -r1.630 theme.inc --- includes/theme.inc 19 Feb 2011 01:07:00 -0000 1.630 +++ includes/theme.inc 21 Feb 2011 02:11:16 -0000 @@ -143,7 +143,7 @@ function _drupal_theme_initialize($theme $theme_info = $theme; $base_theme_info = $base_theme; - $theme_path = dirname($theme->filename); + $theme_path = substr(dirname($theme->filename), strlen('file://' . DRUPAL_ROOT)); // Prepare stylesheets from this theme as well as all ancestor themes. // We work it this way so that we can have child themes override parent @@ -206,7 +206,7 @@ function _drupal_theme_initialize($theme // Initialize the theme. if (isset($theme->engine)) { // Include the engine. - include_once DRUPAL_ROOT . '/' . $theme->owner; + include_once $theme->owner; $theme_engine = $theme->engine; if (function_exists($theme_engine . '_init')) { @@ -221,12 +221,12 @@ function _drupal_theme_initialize($theme foreach ($base_theme as $base) { // Include the theme file or the engine. if (!empty($base->owner)) { - include_once DRUPAL_ROOT . '/' . $base->owner; + include_once $base->owner; } } // and our theme gets one too. if (!empty($theme->owner)) { - include_once DRUPAL_ROOT . '/' . $theme->owner; + include_once $theme->owner; } } @@ -393,7 +393,7 @@ function _theme_process_registry(&$cache if (isset($info['file'])) { $include_file = isset($info['path']) ? $info['path'] : $path; $include_file .= '/' . $info['file']; - include_once DRUPAL_ROOT . '/' . $include_file; + include_once $include_file; $result[$hook]['includes'][] = $include_file; } @@ -791,7 +791,7 @@ function theme($hook, $variables = array // Include a file if the theme function or variable processor is held elsewhere. if (!empty($info['includes'])) { foreach ($info['includes'] as $include_file) { - include_once DRUPAL_ROOT . '/' . $include_file; + include_once $include_file; } } @@ -1231,7 +1231,7 @@ function theme_get_setting($setting_name function theme_render_template($template_file, $variables) { extract($variables, EXTR_SKIP); // Extract the variables to a local namespace ob_start(); // Start output buffering - include DRUPAL_ROOT . '/' . $template_file; // Include the template file + include $template_file; // Include the template file return ob_get_clean(); // End buffering and return its contents } Index: themes/engines/phptemplate/phptemplate.engine =================================================================== RCS file: /cvs/drupal/drupal/themes/engines/phptemplate/phptemplate.engine,v retrieving revision 1.75 diff -u -p -r1.75 phptemplate.engine --- themes/engines/phptemplate/phptemplate.engine 23 Feb 2010 19:03:37 -0000 1.75 +++ themes/engines/phptemplate/phptemplate.engine 21 Feb 2011 02:11:16 -0000 @@ -12,7 +12,7 @@ function phptemplate_init($template) { $file = dirname($template->filename) . '/template.php'; if (file_exists($file)) { - include_once DRUPAL_ROOT . '/' . $file; + include_once $file; } }