diff options
Diffstat (limited to 'includes/theme.inc')
-rw-r--r-- | includes/theme.inc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index 2ad9f2e6e..3b76c070c 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -166,7 +166,7 @@ function _init_theme($theme, $base_theme = array(), $registry_callback = '_theme // Initialize the theme. if (isset($theme->engine)) { // Include the engine. - include_once './' . $theme->owner; + include_once DRUPAL_ROOT . '/' . $theme->owner; $theme_engine = $theme->engine; if (function_exists($theme_engine . '_init')) { @@ -181,12 +181,12 @@ function _init_theme($theme, $base_theme = array(), $registry_callback = '_theme foreach ($base_theme as $base) { // Include the theme file or the engine. if (!empty($base->owner)) { - include_once './' . $base->owner; + include_once DRUPAL_ROOT . '/' . $base->owner; } } // and our theme gets one too. if (!empty($theme->owner)) { - include_once './' . $theme->owner; + include_once DRUPAL_ROOT . '/' . $theme->owner; } } @@ -298,10 +298,10 @@ function _theme_process_registry(&$cache, $name, $type, $theme, $path) { // files can prevent them from getting registered. if (isset($info['file']) && !isset($info['path'])) { $result[$hook]['file'] = $path . '/' . $info['file']; - include_once($result[$hook]['file']); + include_once DRUPAL_ROOT . '/' . $result[$hook]['file']; } elseif (isset($info['file']) && isset($info['path'])) { - include_once($info['path'] . '/' . $info['file']); + include_once DRUPAL_ROOT . '/' . $info['path'] . '/' . $info['file']; } if (isset($info['template']) && !isset($info['path'])) { @@ -600,7 +600,7 @@ function theme() { if (isset($info['path'])) { $include_file = $info['path'] . '/' . $include_file; } - include_once($include_file); + include_once DRUPAL_ROOT . '/' . $include_file; } if (isset($info['function'])) { // The theme call is a function. @@ -974,12 +974,12 @@ function theme_get_setting($setting_name, $refresh = FALSE) { * The output generated by the template. */ function theme_render_template($file, $variables) { - extract($variables, EXTR_SKIP); // Extract the variables to a local namespace - ob_start(); // Start output buffering - include "./$file"; // Include the file - $contents = ob_get_contents(); // Get the contents of the buffer - ob_end_clean(); // End buffering and discard - return $contents; // Return the contents + extract($variables, EXTR_SKIP); // Extract the variables to a local namespace + ob_start(); // Start output buffering + include DRUPAL_ROOT . '/' . $file; // Include the file + $contents = ob_get_contents(); // Get the contents of the buffer + ob_end_clean(); // End buffering and discard + return $contents; // Return the contents } /** |