summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-01-18 06:53:53 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-01-18 06:53:53 +0000
commitb7ab3d431f676ee59f80e6b38925c97bcf39049b (patch)
tree633eeb976a6cac191635c9af552ef2162a0b7b73
parentaf81911cb75b759bcfb298b3a9dfe073e2ef2228 (diff)
downloadbrdo-b7ab3d431f676ee59f80e6b38925c97bcf39049b.tar.gz
brdo-b7ab3d431f676ee59f80e6b38925c97bcf39049b.tar.bz2
#297952 by aaron: Fix naming conflict with 'file' preprocess variable.
-rw-r--r--includes/theme.inc19
1 files changed, 10 insertions, 9 deletions
diff --git a/includes/theme.inc b/includes/theme.inc
index 86daffa88..9fd7f8b08 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -999,21 +999,22 @@ function theme_get_setting($setting_name, $refresh = FALSE) {
/**
* Render a system default template, which is essentially a PHP template.
*
- * @param $file
- * The filename of the template to render.
+ * @param $template_file
+ * The filename of the template to render. Note that this will overwrite
+ * anything stored in $variables['template_file'] if using a preprocess hook.
* @param $variables
* A keyed array of variables that will appear in the output.
*
* @return
* 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 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
+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
+ $contents = ob_get_contents(); // Get the contents of the buffer
+ ob_end_clean(); // End buffering and discard
+ return $contents; // Return the contents
}
/**