diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index c531dbc09e0..e2adaa6700f 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -56,6 +56,8 @@ if (!defined('NOREQUIREAJAX')) { // Note that only directory logo is free to access without login. $needlogin = 1; if (isset($_GET["modulepart"])) { + // Some value of modulepart can be used to get resources that are public so no login are required. + // For logo of company if ($_GET["modulepart"] == 'mycompany' && preg_match('/^\/?logos\//', $_GET['file'])) { $needlogin = 0; @@ -64,10 +66,11 @@ if (isset($_GET["modulepart"])) { if ($_GET["modulepart"] == 'barcode') { $needlogin = 0; } - // Some value of modulepart can be used to get resources that are public so no login are required. + // Medias files if ($_GET["modulepart"] == 'medias') { $needlogin = 0; } + // User photo if ($_GET["modulepart"] == 'userphotopublic') { $needlogin = 0; } diff --git a/htdocs/website/index.php b/htdocs/website/index.php index e0b4d4c6c84..997af5d8f2f 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -3731,6 +3731,13 @@ if ($action == 'editcss') { print ''; // MAX_FILE_SIZE must precede the field type=file } print ''; + + $uploadfolder = $conf->website->dir_output.'/'.$websitekey; + if (dol_is_file($uploadfolder.'/favicon.png')) { + print '