Minor code improvement.

This commit is contained in:
LarsDW223
2016-05-11 22:11:11 +02:00
parent 738390afa9
commit ca75fd34f2

View File

@@ -1026,10 +1026,10 @@ class syntax_plugin_filelist extends DokuWiki_Syntax_Plugin {
$url = $webdir.substr($filepath, strlen($basedir)).$urlparams; $url = $webdir.substr($filepath, strlen($basedir)).$urlparams;
if ($ftp) if ($ftp)
{ {
$url = str_replace('\\','/', $url);
if (strpos($url, 'http') === false) { if (strpos($url, 'http') === false) {
$url = 'ftp:'.str_replace('\\','/', $url); $url = 'ftp:'.$url;
} else { } else {
$url = str_replace('\\','/', $url);
$url = str_replace('http','ftp', $url); $url = str_replace('http','ftp', $url);
} }
} }