Skip to content
Snippets Groups Projects
Commit 9eef4055 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

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

parent 477d1f7b
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -690,7 +690,7 @@ function drupal_get_filename($type, $name, $filename = NULL) { ...@@ -690,7 +690,7 @@ function drupal_get_filename($type, $name, $filename = NULL) {
try { try {
if (function_exists('db_query')) { if (function_exists('db_query')) {
$file = db_query("SELECT filename FROM {system} WHERE name = :name AND type = :type", array(':name' => $name, ':type' => $type))->fetchField(); $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; $files[$type][$name] = $file;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment