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

- Patch #60441 by dopry: fixed file_create_url().

parent cf14d26c
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@
*/
function file_create_url($path) {
// Strip file_directory_path from $path. We only include relative paths in urls.
if (strpos($path, file_directory_path()) !== false) {
if (strpos($path, file_directory_path() . '/') === 0) {
$path = trim(substr($path, strlen(file_directory_path())), '\\/');
}
switch (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC)) {
......
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