From 9eef40557238574c68a3fb4de1a69baabc31e9ea Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 27 Sep 2010 01:14:10 +0000 Subject: [PATCH] - Patch #922008 by davehimself, litwol: drupal_get_filename() does not respect DRUPAL_ROOT. --- includes/bootstrap.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 53897c6836a..b4c550b3eb4 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -690,7 +690,7 @@ function drupal_get_filename($type, $name, $filename = NULL) { try { if (function_exists('db_query')) { $file = db_query("SELECT filename FROM {system} WHERE name = :name AND type = :type", array(':name' => $name, ':type' => $type))->fetchField(); - if (file_exists($file)) { + if (file_exists(DRUPAL_ROOT . '/' . $file)) { $files[$type][$name] = $file; } }