Commit 9eef4055 authored by Dries's avatar Dries
Browse files

- Patch #922008 by davehimself, litwol: drupal_get_filename() does not respect DRUPAL_ROOT.

parent 477d1f7b
......@@ -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;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment