diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index 1ae45fee768..9805801b4b5 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -154,7 +154,7 @@ function dolWebsiteReplacementOfLinks($website, $content, $removephppart = 0, $c // Protect the link styles.css.php to any replacement that we make after. $content = str_replace('href="styles.css.php', 'href="!~!~!~styles.css.php', $content); - // Replace relative link / with dolibarr URL + // Replace relative link '/' with dolibarr URL $content = preg_replace('/(href=")\/\"/', '\1!~!~!~'.DOL_URL_ROOT.'/website/index.php?website='.$website->ref.'&pageid='.$website->fk_default_home.'"', $content, -1, $nbrep); // Replace relative link /xxx.php#aaa or /xxx.php with dolibarr URL (we discard param ?...) $content = preg_replace('/(href=")\/?([^:\"\!]*)\.php(#[^\"<>]*)?\"/', '\1!~!~!~'.DOL_URL_ROOT.'/website/index.php?website='.$website->ref.'&pageref=\2\3"', $content, -1, $nbrep); @@ -165,7 +165,8 @@ function dolWebsiteReplacementOfLinks($website, $content, $removephppart = 0, $c $content = preg_replace('/url\((["\']?)medias\//', 'url(\1!~!~!~'.DOL_URL_ROOT.'/viewimage.php?modulepart=medias&file=', $content, -1, $nbrep); $content = preg_replace('/data-slide-bg=(["\']?)medias\//', 'data-slide-bg=\1!~!~!~'.DOL_URL_ROOT.'/viewimage.php?modulepart=medias&file=', $content, -1, $nbrep); - // ]*src=")(medias\/)/', '\1!~!~!~'.DOL_URL_ROOT.'/viewimage.php?modulepart=medias&file=', $content, -1, $nbrep); // ]*src=")(?!(http|\/?viewimage|'.preg_quote(DOL_URL_ROOT, '/').'\/viewimage))/', '\1!~!~!~'.DOL_URL_ROOT.'/viewimage.php?modulepart=medias&file=', $content, -1, $nbrep); diff --git a/htdocs/core/tpl/filemanager.tpl.php b/htdocs/core/tpl/filemanager.tpl.php index c0eff19fa84..a178f6400b8 100644 --- a/htdocs/core/tpl/filemanager.tpl.php +++ b/htdocs/core/tpl/filemanager.tpl.php @@ -163,11 +163,12 @@ if (empty($action) || $action == 'editfile' || $action == 'file_manager' || preg // Show the link to "Root" if ($showroot) { - print '
'.$langs->trans("Root").'
'; + print '
'; + if ($module == 'medias') print $langs->trans("RootOfMedias"); + else print $langs->trans("Root"); + print '
'; } - - print ''; // Show filemanager tree (will be filled by a call of ajax /ecm/tpl/enablefiletreeajax.tpl.php, later, that executes ajaxdirtree.php) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 880978a13e5..1775ab266bb 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -705,6 +705,7 @@ DateOfSignature=Date of signature HidePassword=Show command with password hidden UnHidePassword=Show real command with clear password Root=Root +RootOfMedias=Root of public medias (/medias) Informations=Information Page=Page Notes=Notes