Skip to content

Commit

Permalink
Merge branch 'FIX_7.0_sendmailcard_sendto' of github.com:ATM-Consulti…
Browse files Browse the repository at this point in the history
…ng/dolibarr into 7.0
  • Loading branch information
atm-lena committed Feb 6, 2020
2 parents ed3a4c6 + a6a2a9e commit d2c629f
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 13 deletions.
10 changes: 10 additions & 0 deletions .stickler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
linters:
phpcs:
standard: 'dev/setup/codesniffer/ruleset.xml'
extensions: 'php'
tab_width: 4
fixer: true

fixers:
enable: true
7 changes: 5 additions & 2 deletions htdocs/accountancy/index.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2016 Laurent Destailleur <[email protected]>
* Copyright (C) 2016 Alexandre Spangaro <[email protected]>
/* Copyright (C) 2016 Laurent Destailleur <[email protected]>
* Copyright (C) 2016 Alexandre Spangaro <[email protected]>
* Copyright (C) 2019 Frédéric France <[email protected]>
*
* 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
Expand Down Expand Up @@ -60,6 +61,7 @@
llxHeader('', $langs->trans("AccountancyArea"));

print load_fiche_titre($langs->trans("AccountancyArea"), '', 'title_accountancy');
dol_fiche_head();

$step = 0;

Expand Down Expand Up @@ -175,6 +177,7 @@
{
print $langs->trans("Module10Desc")."<br>\n";
}
dol_fiche_end();

llxFooter();
$db->close();
12 changes: 6 additions & 6 deletions htdocs/compta/sociales/class/chargesociales.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,17 +291,17 @@ function update($user,$notrigger=0)
$sql.= ", date_ech='".$this->db->idate($this->date_ech)."'";
$sql.= ", periode='".$this->db->idate($this->periode)."'";
$sql.= ", amount='".price2num($this->amount,'MT')."'";
$sql.= ", fk_projet='".$this->db->escape($this->fk_project)."'";
$sql.= ", fk_projet=".($this->fk_project>0?$this->db->escape($this->fk_project):"NULL");
$sql.= ", fk_user_modif=".$user->id;
$sql.= " WHERE rowid=".$this->id;

dol_syslog(get_class($this)."::update", LOG_DEBUG);
$resql=$this->db->query($sql);

if (! $resql) {
$error++; $this->errors[]="Error ".$this->db->lasterror();
}

if (! $error)
{
if (! $notrigger)
Expand All @@ -312,7 +312,7 @@ function update($user,$notrigger=0)
// End call triggers
}
}

// Commit or rollback
if ($error)
{
Expand All @@ -329,8 +329,8 @@ function update($user,$notrigger=0)
$this->db->commit();
return 1;
}


}

/**
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/actions_sendmails.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@
$mesg='<div class="error">';
if ($mailfile->error)
{
$mesg.=$langs->trans('ErrorFailedToSendMail',$from,$sendto);
$mesg.=$langs->transnoentities('ErrorFailedToSendMail',dol_escape_htmltag($from),dol_escape_htmltag($sendto));
$mesg.='<br>'.$mailfile->error;
}
else
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/class/html.formmail.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ function get_form($addfileaction='addfile',$removefileaction='removefile')
{
if (! empty($this->withtofree))
{
$out.= '<input class="minwidth200" id="sendto" name="sendto" value="'.(! is_array($this->withto) && ! is_numeric($this->withto)? (isset($_REQUEST["sendto"])?$_REQUEST["sendto"]:$this->withto) :"").'" />';
$out.= '<input class="minwidth200" id="sendto" name="sendto" value="'.((! is_array($this->withto) && ! is_numeric($this->withto))? (isset($_POST["sendto"])?$_POST["sendto"]:$this->withto) : (isset($_POST["sendto"])?$_POST["sendto"]:"") ).'" />';
}
if (! empty($this->withto) && is_array($this->withto))
{
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/lib/company.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ function show_projects($conf, $langs, $db, $object, $backtopage='', $nocreatelin
}
else
{
print '<tr class="oddeven"><td colspan="5" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
print '<tr class="oddeven"><td colspan="8" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
}
$db->free($result);
}
Expand Down
4 changes: 3 additions & 1 deletion htdocs/core/lib/functions.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1376,6 +1376,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
$fileimagebis = $file.'_preview-0.png'; // If PDF has more than one page
$relativepathimage = $relativepath.'_preview.png';


// Si fichier PDF existe
if (file_exists($file))
{
Expand All @@ -1387,7 +1388,8 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
{
if (empty($conf->global->MAIN_DISABLE_PDF_THUMBS)) // If you experienc trouble with pdf thumb generation and imagick, you can disable here.
{
$ret = dol_convert_file($file, 'png', $fileimage);
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$ret = dol_convert_file($file, 'png', $fileimage);
if ($ret < 0) $error++;
}
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/tpl/card_presend.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
}
}

$formmail->withto = GETPOST('sendto') ? GETPOST('sendto') : $liste;
$formmail->withto = $liste;
$formmail->withtocc = $liste;
$formmail->withtoccc = $conf->global->MAIN_EMAIL_USECCC;
$formmail->withtopic = $topicmail;
Expand Down

0 comments on commit d2c629f

Please sign in to comment.