From ca75fd34f2ecb4e814671007daf93c23b100277e Mon Sep 17 00:00:00 2001 From: LarsDW223 Date: Wed, 11 May 2016 22:11:11 +0200 Subject: [PATCH] Minor code improvement. --- syntax.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syntax.php b/syntax.php index 8da86d4..6ab827a 100644 --- a/syntax.php +++ b/syntax.php @@ -1026,10 +1026,10 @@ class syntax_plugin_filelist extends DokuWiki_Syntax_Plugin { $url = $webdir.substr($filepath, strlen($basedir)).$urlparams; if ($ftp) { + $url = str_replace('\\','/', $url); if (strpos($url, 'http') === false) { - $url = 'ftp:'.str_replace('\\','/', $url); + $url = 'ftp:'.$url; } else { - $url = str_replace('\\','/', $url); $url = str_replace('http','ftp', $url); } }