Fix phpcs

This commit is contained in:
Laurent Destailleur 2021-05-03 20:22:36 +02:00
parent e4499976e9
commit 6e32efdb40
3 changed files with 9 additions and 17 deletions

View File

@ -112,15 +112,12 @@ clearstatcache();
// Show link on other years // Show link on other years
$year_dirs = dol_dir_list($dir, 'directories', 0, '^[0-9]{4}$', '', 'DESC'); $year_dirs = dol_dir_list($dir, 'directories', 0, '^[0-9]{4}$', '', 'DESC');
foreach ($year_dirs as $d) foreach ($year_dirs as $d) {
{
print '<a href="'.$_SERVER["PHP_SELF"].'?year='.$d['name'].'">'.$d['name'].'</a> &nbsp;'; print '<a href="'.$_SERVER["PHP_SELF"].'?year='.$d['name'].'">'.$d['name'].'</a> &nbsp;';
} }
if ($year) if ($year) {
{ if (is_dir($dir.'/'.$year)) {
if (is_dir($dir.'/'.$year))
{
if (!empty($year_dirs)) print '<br>'; if (!empty($year_dirs)) print '<br>';
print '<br>'; print '<br>';
print '<table width="100%" class="noborder">'; print '<table width="100%" class="noborder">';

View File

@ -938,7 +938,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
//E-mail //E-mail
't.email', 't.email',
); );
//Social media //Social media
// foreach ($socialnetworks as $key => $value) { // foreach ($socialnetworks as $key => $value) {
// if ($value['active']) { // if ($value['active']) {
// $searchAddressPhoneDBFields['t.'.$key] = "t.socialnetworks->'$.".$key."'"; // $searchAddressPhoneDBFields['t.'.$key] = "t.socialnetworks->'$.".$key."'";

View File

@ -395,8 +395,7 @@ class pdf_espadon extends ModelePdfExpedition
// Notes // Notes
$pagenb = $pdf->getPage(); $pagenb = $pdf->getPage();
if (!empty($notetoshow)) if (!empty($notetoshow)) {
{
$tab_top -= 2; $tab_top -= 2;
$tab_width = $this->page_largeur - $this->marge_gauche - $this->marge_droite; $tab_width = $this->page_largeur - $this->marge_gauche - $this->marge_droite;
@ -415,8 +414,7 @@ class pdf_espadon extends ModelePdfExpedition
$pageposafternote = $pdf->getPage(); $pageposafternote = $pdf->getPage();
$posyafter = $pdf->GetY(); $posyafter = $pdf->GetY();
if ($pageposafternote > $pageposbeforenote) if ($pageposafternote > $pageposbeforenote) {
{
$pdf->rollbackTransaction(true); $pdf->rollbackTransaction(true);
// prepare pages to receive notes // prepare pages to receive notes
@ -440,8 +438,7 @@ class pdf_espadon extends ModelePdfExpedition
$posyafter = $pdf->GetY(); $posyafter = $pdf->GetY();
if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) { // There is no space left for total+free text
{
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
$pagenb++; $pagenb++;
$pageposafternote++; $pageposafternote++;
@ -490,8 +487,7 @@ class pdf_espadon extends ModelePdfExpedition
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1); $pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) {
{
// not enough space, need to add page // not enough space, need to add page
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
$pagenb++; $pagenb++;
@ -526,8 +522,7 @@ class pdf_espadon extends ModelePdfExpedition
// Loop on each lines // Loop on each lines
$pageposbeforeprintlines = $pdf->getPage(); $pageposbeforeprintlines = $pdf->getPage();
$pagenb = $pageposbeforeprintlines; $pagenb = $pageposbeforeprintlines;
for ($i = 0; $i < $nblines; $i++) for ($i = 0; $i < $nblines; $i++) {
{
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
$pdf->SetTextColor(0, 0, 0); $pdf->SetTextColor(0, 0, 0);