diff --git a/htdocs/document.php b/htdocs/document.php index d6f6584bb6f..c13e8f42a73 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -5,6 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010 Pierre Morin * Copyright (C) 2010 Juanjo Menent + * Copyright (C) 2022 Ferran Marcet * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -162,6 +163,11 @@ if (!empty($hashp)) { $modulepart = $moduleparttocheck; $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir } + $entity = $ecmfile->entity; + if ($entity != $conf->entity) { + $conf->entity = $entity; + $conf->setValues($db); + } } else { $langs->load("errors"); accessforbidden($langs->trans("ErrorFileNotFoundWithSharedLink"), 0, 0, 1); diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 82567e05fac..25034194119 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -3187,7 +3187,7 @@ if ($module == 'initmodule') { print ''; print ''; - print $perm[1]; + print $langs->trans($perm[1]); print ''; print ''; diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php index c77d9bd1232..597372fc17c 100644 --- a/htdocs/user/bank.php +++ b/htdocs/user/bank.php @@ -455,9 +455,12 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac $holiday->id = $objp->rowid; $holiday->ref = $objp->rowid; + $holiday->fk_type = $objp->fk_type; $holiday->statut = $objp->status; - $nbopenedday = num_open_day($db->jdate($objp->date_debut), $db->jdate($objp->date_fin), 0, 1, $objp->halfday); + $holiday->status = $objp->status; + + $nbopenedday = num_open_day($db->jdate($objp->date_debut, 'gmt'), $db->jdate($objp->date_fin, 'gmt'), 0, 1, $objp->halfday); print ''; print '';