diff --git a/ChangeLog b/ChangeLog
index a834ef3e56a..da1efec9138 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,13 @@ For developers:
* Code changes to be more compatible with PSR2
* Removed trigger USER_LOGOUT, USER_LOGIN, USER_LOGIN_FAILED (Some hooks are already dedicated for that)
+WARNING:
+
+Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
+* If you use some links like viewimages.php?modulepart=mycompany&file=... in you external modules, you must
+ relace them with links like viewimages.php?modulepart=mycompany&file=logos/... (note that link change only for
+ modulepart=mycompany that now works like others).
+
***** ChangeLog for 8.0.1 compared to 8.0.0 *****
diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php
index 7bc968457f9..f7242ee43bc 100644
--- a/htdocs/admin/company.php
+++ b/htdocs/admin/company.php
@@ -50,6 +50,7 @@ $error=0;
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('admincompany','globaladmin'));
+
/*
* Actions
*/
@@ -397,7 +398,7 @@ if ($action == 'edit' || $action == 'updateedit')
print ''.img_delete($langs->trans("Delete")).'';
if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) {
print ' ';
- print '';
+ print '
';
}
} else {
print '
';
@@ -791,7 +792,7 @@ else
}
else if ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
{
- print '';
+ print '
';
}
else
{
diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php
index 4cb5a907927..1f2fdd26e5f 100644
--- a/htdocs/admin/ihm.php
+++ b/htdocs/admin/ihm.php
@@ -413,7 +413,7 @@ if ($action == 'edit') // Edit
print ''.img_delete($langs->trans("Delete")).'';
if (file_exists($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND)) {
print ' ';
- print '
';
+ print '
';
}
} else {
print '
';
@@ -561,7 +561,7 @@ else // Show
print $conf->global->MAIN_LOGIN_BACKGROUND;
if ($conf->global->MAIN_LOGIN_BACKGROUND && is_file($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND))
{
- print '';
+ print '
';
}
else
{
diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php
index 24b94562915..de0324a97fe 100644
--- a/htdocs/cashdesk/index.php
+++ b/htdocs/cashdesk/index.php
@@ -63,7 +63,7 @@ top_htmlhead('','',0,0,'',$arrayofcss);
logo_small))
{
- print '
';
+ print '
';
}
else
{
diff --git a/htdocs/cashdesk/tpl/ticket.tpl.php b/htdocs/cashdesk/tpl/ticket.tpl.php
index 3937c9dbde3..0d4a484b66e 100644
--- a/htdocs/cashdesk/tpl/ticket.tpl.php
+++ b/htdocs/cashdesk/tpl/ticket.tpl.php
@@ -47,7 +47,7 @@ $object->fetch($facid);
name; ?>
diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php
index 472ecbb40e5..432c857850b 100644
--- a/htdocs/core/lib/files.lib.php
+++ b/htdocs/core/lib/files.lib.php
@@ -2161,10 +2161,10 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
$original_file=$dirins.'/'.$original_file;
}
// Wrapping for some images
- elseif (($modulepart == 'mycompany' || $modulepart == 'companylogo') && !empty($conf->mycompany->dir_output))
+ elseif ($modulepart == 'mycompany' && !empty($conf->mycompany->dir_output))
{
$accessallowed=1;
- $original_file=$conf->mycompany->dir_output.'/logos/'.$original_file;
+ $original_file=$conf->mycompany->dir_output.'/'.$original_file;
}
// Wrapping for users photos
elseif ($modulepart == 'userphoto' && !empty($conf->user->dir_output))
diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php
index 73bb51d464a..235421a598e 100644
--- a/htdocs/core/lib/security.lib.php
+++ b/htdocs/core/lib/security.lib.php
@@ -662,6 +662,7 @@ function accessforbidden($message='',$printheader=1,$printfooter=1,$showonlymess
{
include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php';
$langs=new Translate('',$conf);
+ $langs->setDefaultLang();
}
$langs->load("errors");
diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php
index a23661f2f02..8c8bb3cbb10 100644
--- a/htdocs/core/lib/security2.lib.php
+++ b/htdocs/core/lib/security2.lib.php
@@ -228,11 +228,11 @@ if (! function_exists('dol_loginfunction'))
if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
{
- $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('thumbs/'.$mysoc->logo_small);
+ $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_small);
}
elseif (! empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo))
{
- $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode($mysoc->logo);
+ $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo);
$width=128;
}
elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png'))
diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php
index 19e8cb3002f..e6ce5c1bddd 100644
--- a/htdocs/core/lib/ticket.lib.php
+++ b/htdocs/core/lib/ticket.lib.php
@@ -160,9 +160,9 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $
$urllogo = DOL_URL_ROOT . '/theme/login_logo.png';
if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output . '/logos/thumbs/' . $mysoc->logo_small)) {
- $urllogo = DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file=' . urlencode('thumbs/' . $mysoc->logo_small);
+ $urllogo = DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file=' . urlencode('logos/thumbs/'.$mysoc->logo_small);
} elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output . '/logos/' . $mysoc->logo)) {
- $urllogo = DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file=' . urlencode($mysoc->logo);
+ $urllogo = DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file=' . urlencode('logos/'.$mysoc->logo);
$width = 128;
} elseif (is_readable(DOL_DOCUMENT_ROOT . '/theme/dolibarr_logo.png')) {
$urllogo = DOL_URL_ROOT . '/theme/dolibarr_logo.png';
diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php
index e59ac551eb3..1957f2c820d 100644
--- a/htdocs/core/lib/website.lib.php
+++ b/htdocs/core/lib/website.lib.php
@@ -150,11 +150,13 @@ function dolWebsiteOutput($content)
$nbrep=0;
if (! $symlinktomediaexists)
{
- $content=preg_replace('/(
-