- Patch #60441 by dopry: fixed file_create_url().
parent
cf14d26cff
commit
6c38bc57e8
|
@ -28,7 +28,7 @@ define('FILE_EXISTS_ERROR', 2);
|
|||
*/
|
||||
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)) {
|
||||
|
|
Loading…
Reference in New Issue