From 4c605283f5b515f6d9dddb0359a0fede90d574e9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Apr 2020 00:09:21 +0200 Subject: [PATCH] Fix phpcs --- htdocs/accountancy/index.php | 4 ++-- htdocs/admin/dolistore/class/dolistore.class.php | 4 ++-- htdocs/comm/mailing/class/advtargetemailing.class.php | 4 ++-- htdocs/core/class/html.form.class.php | 4 ++-- htdocs/ticket/card.php | 2 +- htdocs/ticket/class/ticket.class.php | 8 ++++---- htdocs/website/index.php | 4 +++- 7 files changed, 16 insertions(+), 14 deletions(-) diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index 2379c31ce53..56cf674505b 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -124,12 +124,12 @@ if ($conf->accounting->enabled) print "
\n"; $step++; - $textlink = ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").''.''; + $textlink = ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").''; print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink); print "
\n"; if (!empty($conf->tax->enabled)) { - $textlink = ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").''.''; + $textlink = ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").''; $step++; print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink); print "
\n"; diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php index d250203b3d8..230c588f7e4 100644 --- a/htdocs/admin/dolistore/class/dolistore.class.php +++ b/htdocs/admin/dolistore/class/dolistore.class.php @@ -267,8 +267,8 @@ class Dolistore // add image or default ? if ($product->id_default_image != '') { $image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.$product->id.'&id_image='.$product->id_default_image; - $images = ''. - ''; + $images = ''; + $images .= ''; } else { $images = ''; } diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 7bb73a61c9f..b398235e8d8 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -725,12 +725,12 @@ class AdvanceTargetingMailing extends CommonObject } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'int') || ($extrafields->attributes[$elementtype]['type'][$key] == 'double')) { if (!empty($arrayquery['options_'.$key.'_max_cnct'])) { - $sqlwhere[] = " (te.".$key." >= ".$arrayquery['options_'.$key.'_max'.'_cnct']." AND te.".$key." <= ".$arrayquery['options_'.$key.'_min_cnct'].")"; + $sqlwhere[] = " (te.".$key." >= ".$arrayquery['options_'.$key.'_max_cnct']." AND te.".$key." <= ".$arrayquery['options_'.$key.'_min_cnct'].")"; } } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'date') || ($extrafields->attributes[$elementtype]['type'][$key] == 'datetime')) { if (!empty($arrayquery['options_'.$key.'_end_dt_cnct'])) { - $sqlwhere[] = " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'.'_cnct'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt_cnct'])."')"; + $sqlwhere[] = " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt_cnct'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt_cnct'])."')"; } } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'boolean') { if ($arrayquery['options_'.$key.'_cnct'] != '') { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 05174f176b0..25ed9f86625 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6642,7 +6642,7 @@ class Form $out .= 'function formatResult(record) {'."\n"; if ($elemtype == 'category') { - $out .= 'return \' \'+record.text+\'\';'; + $out .= 'return \' \'+record.text+\'\';'; } else { @@ -6652,7 +6652,7 @@ class Form $out .= 'function formatSelection(record) {'."\n"; if ($elemtype == 'category') { - $out .= 'return \' \'+record.text+\'\';'; + $out .= 'return \' \'+record.text+\'\';'; } else { diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 7f4601eb177..b9459a0e161 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -864,7 +864,7 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd if (!empty($object->date_read)) { print dol_print_date($object->date_read, 'dayhour'); print ' - '.$langs->trans("TicketTimeToRead").': '.convertSecondToTime(roundUpToNextMultiple($object->date_read - $object->datec, 60)).''; - print ' - '.$langs->trans("TimeElapsedSince").': '.''.convertSecondToTime(roundUpToNextMultiple($now - $object->date_read, 60)).''; + print ' - '.$langs->trans("TimeElapsedSince").': '.convertSecondToTime(roundUpToNextMultiple($now - $object->date_read, 60)).''; } print ''; diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 85c900eaf55..f94599153f0 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1441,10 +1441,10 @@ class Ticket extends CommonObject if ($info_sendto['source'] == 'internal') { $url_internal_ticket = dol_buildpath('/ticket/card.php', 2).'?track_id='.$this->track_id; - $message .= "\n".$langs->transnoentities('TicketNotificationEmailBodyInfosTrackUrlinternal').' : '.''.$this->track_id.''."\n"; + $message .= "\n".$langs->transnoentities('TicketNotificationEmailBodyInfosTrackUrlinternal').' : '.$this->track_id.''."\n"; } else { $url_public_ticket = ($conf->global->TICKET_URL_PUBLIC_INTERFACE ? $conf->global->TICKET_URL_PUBLIC_INTERFACE.'/' : dol_buildpath('/public/ticket/view.php', 2)).'?track_id='.$this->track_id; - $message .= "\n".$langs->transnoentities('TicketNewEmailBodyInfosTrackUrlCustomer').' : '.''.$this->track_id.''."\n"; + $message .= "\n".$langs->transnoentities('TicketNewEmailBodyInfosTrackUrlCustomer').' : '.$this->track_id.''."\n"; } $message .= "\n"; @@ -2510,7 +2510,7 @@ class Ticket extends CommonObject $url_internal_ticket = dol_buildpath('/ticket/card.php', 2).'?track_id='.$object->track_id; // altairis: make html link on url - $message .= "\n".$langs->trans('TicketNotificationEmailBodyInfosTrackUrlinternal').' : '.''.$object->track_id.''."\n"; + $message .= "\n".$langs->trans('TicketNotificationEmailBodyInfosTrackUrlinternal').' : '.$object->track_id.''."\n"; // Add global email address recipient if ($conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS && !in_array($conf->global->TICKET_NOTIFICATION_EMAIL_TO, $sendto)) { @@ -2572,7 +2572,7 @@ class Ticket extends CommonObject // If public interface is not enable, use link to internal page into mail $url_public_ticket = (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE) ? (!empty($conf->global->TICKET_URL_PUBLIC_INTERFACE) ? $conf->global->TICKET_URL_PUBLIC_INTERFACE.'/view.php' : dol_buildpath('/public/ticket/view.php', 2)) : dol_buildpath('/ticket/card.php', 2)).'?track_id='.$object->track_id; - $message .= "\n".$langs->trans('TicketNewEmailBodyInfosTrackUrlCustomer').' : '.''.$object->track_id.''."\n"; + $message .= "\n".$langs->trans('TicketNewEmailBodyInfosTrackUrlCustomer').' : '.$object->track_id.''."\n"; // Build final message $message = $message_intro.$message; diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 403473071f4..a617d9ae018 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2719,7 +2719,9 @@ if ($action == 'editcss') { $csscontent = GETPOST('WEBSITE_CSS_INLINE', 'none'); } - if (!trim($csscontent)) $csscontent = '/* CSS content (all pages) */'."\n"."body.bodywebsite { margin: 0; font-family: 'Open Sans', sans-serif; }\n.bodywebsite h1 { margin-top: 0; margin-bottom: 0; padding: 10px;}"; + if (!trim($csscontent)) { + $csscontent = '/* CSS content (all pages) */'."\nbody.bodywebsite { margin: 0; font-family: 'Open Sans', sans-serif; }\n.bodywebsite h1 { margin-top: 0; margin-bottom: 0; padding: 10px;}"; + } if (!GETPOSTISSET('WEBSITE_JS_INLINE')) {