Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 17.0

This commit is contained in:
Laurent Destailleur 2023-02-26 20:37:06 +01:00
commit 87454607af
7 changed files with 14 additions and 9 deletions

View File

@ -1363,6 +1363,9 @@ if (empty($reshook)) {
$date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); $date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear'));
$remise_percent = price2num(GETPOST('remise_percent'), '', 2); $remise_percent = price2num(GETPOST('remise_percent'), '', 2);
if (empty($remise_percent)) {
$remise_percent = 0;
}
// Prepare a price equivalent for minimum price check // Prepare a price equivalent for minimum price check
$pu_equivalent = $pu_ht; $pu_equivalent = $pu_ht;

View File

@ -190,7 +190,7 @@ if (($action == 'send' || $action == 'relance') && !GETPOST('addfile') && !GETPO
$tmparray[] = trim(GETPOST('sendto', 'alphawithlgt')); $tmparray[] = trim(GETPOST('sendto', 'alphawithlgt'));
} }
if (trim($_POST['tomail'])) { if (isset($_POST['tomail']) && trim($_POST['tomail'])) {
// Recipients are provided into free hidden text field // Recipients are provided into free hidden text field
$tmparray[] = trim(GETPOST('tomail', 'alphawithlgt')); $tmparray[] = trim(GETPOST('tomail', 'alphawithlgt'));
} }
@ -346,7 +346,7 @@ if (($action == 'send' || $action == 'relance') && !GETPOST('addfile') && !GETPO
// Make substitution in email content // Make substitution in email content
$substitutionarray = getCommonSubstitutionArray($langs, 0, null, $object); $substitutionarray = getCommonSubstitutionArray($langs, 0, null, $object);
$substitutionarray['__EMAIL__'] = $sendto; $substitutionarray['__EMAIL__'] = $sendto;
$substitutionarray['__CHECK_READ__'] = (is_object($object) && is_object($object->thirdparty)) ? '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.urlencode($object->thirdparty->tag).'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>' : ''; $substitutionarray['__CHECK_READ__'] = (is_object($object) && is_object($object->thirdparty)) ? '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?id='.urlencode($object->thirdparty->id).'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>' : '';
$parameters = array('mode'=>'formemail'); $parameters = array('mode'=>'formemail');
complete_substitutions_array($substitutionarray, $langs, $object, $parameters); complete_substitutions_array($substitutionarray, $langs, $object, $parameters);

View File

@ -80,7 +80,7 @@ class box_members_by_type extends ModeleBoxes
public function loadBox($max = 5) public function loadBox($max = 5)
{ {
global $user, $langs, $conf; global $user, $langs, $conf;
$langs->load("boxes"); $langs->loadLangs(array("boxes", "members"));
$this->max = $max; $this->max = $max;
@ -284,7 +284,7 @@ class box_members_by_type extends ModeleBoxes
if ($num == 0) { if ($num == 0) {
$this->info_box_contents[$line][0] = array( $this->info_box_contents[$line][0] = array(
'td' => 'class="center"', 'td' => 'colspan="7" class="center"',
'text' => $langs->trans("NoRecordedMembersByType") 'text' => $langs->trans("NoRecordedMembersByType")
); );
} else { } else {

View File

@ -79,7 +79,7 @@ class box_members_subscriptions_by_year extends ModeleBoxes
public function loadBox($max = 5) public function loadBox($max = 5)
{ {
global $user, $langs, $conf; global $user, $langs, $conf;
$langs->load("boxes"); $langs->loadLangs(array("boxes", "members"));
$this->max = $max; $this->max = $max;
@ -191,7 +191,7 @@ class box_members_subscriptions_by_year extends ModeleBoxes
if ($num == 0) { if ($num == 0) {
$this->info_box_contents[$line][0] = array( $this->info_box_contents[$line][0] = array(
'td' => 'class="center"', 'td' => 'colspan="4" class="center"',
'text' => $langs->trans("NoRecordedMembers"), 'text' => $langs->trans("NoRecordedMembers"),
); );
} else { } else {

View File

@ -2842,7 +2842,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
} }
$original_file = $conf->deplacement->dir_output.'/'.$original_file; $original_file = $conf->deplacement->dir_output.'/'.$original_file;
//$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity; //$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity;
} elseif (($modulepart == 'propal' || $modulepart == 'propale') && !empty($conf->propal->multidir_output[$entity])) { } elseif (($modulepart == 'propal' || $modulepart == 'propale') && isset($conf->propal->multidir_output[$entity])) {
// Wrapping pour les propales // Wrapping pour les propales
if ($fuser->hasRight('propal', $lire) || preg_match('/^specimen/i', $original_file)) { if ($fuser->hasRight('propal', $lire) || preg_match('/^specimen/i', $original_file)) {
$accessallowed = 1; $accessallowed = 1;

View File

@ -104,7 +104,7 @@ class modProduct extends DolibarrModules
// Boxes // Boxes
$this->boxes = array( $this->boxes = array(
0=>array('file'=>'box_produits.php', 'enabledbydefaulton'=>'Home'), 0=>array('file'=>'box_produits.php', 'enabledbydefaulton'=>'Home'),
1=>array('file'=>'box_produits_alerte_stock.php', 'enabledbydefaulton'=>''), 1=>array('file'=>'box_produits_alerte_stock.php', 'enabledbydefaulton'=>'Home'),
2=>array('file'=>'box_graph_product_distribution.php', 'enabledbydefaulton'=>'Home') 2=>array('file'=>'box_graph_product_distribution.php', 'enabledbydefaulton'=>'Home')
); );

View File

@ -4,6 +4,8 @@ MemberCard=Member card
SubscriptionCard=Subscription card SubscriptionCard=Subscription card
Member=Member Member=Member
Members=Members Members=Members
NoRecordedMembers=No recorded members
NoRecordedMembersByType=No recorded members
ShowMember=Show member card ShowMember=Show member card
UserNotLinkedToMember=User not linked to a member UserNotLinkedToMember=User not linked to a member
ThirdpartyNotLinkedToMember=Third party not linked to a member ThirdpartyNotLinkedToMember=Third party not linked to a member