From c991a4d204444b125a7c7a4fd853480ddba49dc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 26 Jul 2018 18:05:20 +0200 Subject: [PATCH] trim trailing --- dev/setup/codesniffer/ruleset.xml | 10 +++++++++- .../bookkeeping/thirdparty_lettrage.php | 2 +- .../thirdparty_lettrage_supplier.php | 2 +- htdocs/commande/card.php | 4 ++-- htdocs/compta/bank/class/bankcateg.class.php | 18 ++++++++--------- htdocs/hrm/class/establishment.class.php | 8 ++++---- htdocs/install/default.css | 20 +++++++++---------- htdocs/printing/index.php | 8 ++++---- htdocs/public/demo/demo.css | 10 +++++----- htdocs/public/notice.php | 8 ++++---- 10 files changed, 49 insertions(+), 41 deletions(-) diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 5f8e4de07f9..29e1f5775e7 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -177,7 +177,15 @@ - + + 0 + + + 0 + + + 0 + diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettrage.php b/htdocs/accountancy/bookkeeping/thirdparty_lettrage.php index c4084b600eb..be335107839 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettrage.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettrage.php @@ -82,7 +82,7 @@ $socid = GETPOST("socid", 'int'); $object = new Societe($db); $object->id = $socid; $result = $object->fetch($socid); -if ($result < 0) +if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettrage_supplier.php b/htdocs/accountancy/bookkeeping/thirdparty_lettrage_supplier.php index 61452230902..905361b4c8e 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettrage_supplier.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettrage_supplier.php @@ -86,7 +86,7 @@ $socid = GETPOST("socid", 'int'); $object = new Societe($db); $object->id = $socid; $result = $object->fetch($socid); -if ($result<0) +if ($result<0) { setEventMessages($object->error, $object->errors, 'errors'); } diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 0c3e4328505..3bdab169f6d 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -700,8 +700,8 @@ if (empty($reshook)) if ($res = $prodcomb->fetchByProductCombination2ValuePairs($idprod, $combinations)) { $idprod = $res->fk_product_child; - } - else + } + else { setEventMessages($langs->trans('ErrorProductCombinationNotFound'), null, 'errors'); $error ++; diff --git a/htdocs/compta/bank/class/bankcateg.class.php b/htdocs/compta/bank/class/bankcateg.class.php index 176fdb626a5..44e4f72c496 100644 --- a/htdocs/compta/bank/class/bankcateg.class.php +++ b/htdocs/compta/bank/class/bankcateg.class.php @@ -31,10 +31,10 @@ class BankCateg // extends CommonObject //public $element='bank_categ'; //!< Id that identify managed objects //public $table_element='bank_categ'; //!< Name of table without prefix where object is stored public $picto='generic'; - + public $id; public $label; - + /** * Constructor @@ -205,7 +205,7 @@ class BankCateg // extends CommonObject { $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_account"; $sql.= " WHERE fk_categorie = ".$this->id; - + $resql = $this->db->query($sql); if (!$resql) { @@ -213,13 +213,13 @@ class BankCateg // extends CommonObject $this->errors[] = "Error ".$this->db->lasterror(); } } - + // Delete link between tag and bank lines if (! $error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class"; $sql.= " WHERE fk_categ = ".$this->id; - + $resql = $this->db->query($sql); if (!$resql) { @@ -227,21 +227,21 @@ class BankCateg // extends CommonObject $this->errors[] = "Error ".$this->db->lasterror(); } } - + // Delete bank categ if (! $error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_categ"; $sql .= " WHERE rowid=".$this->id; - + $resql = $this->db->query($sql); - if (!$resql) + if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } } - + // Commit or rollback if ($error) { foreach ($this->errors as $errmsg) { diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 8a99788d040..b4a03ef0396 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -34,7 +34,7 @@ class Establishment extends CommonObject public $fk_element = 'fk_establishment'; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $picto='building'; - + public $id; public $ref; public $rowid; @@ -208,7 +208,7 @@ class Establishment extends CommonObject $this->country_id = $obj->country_id; $this->country_code = $obj->country_code; - $this->country = $obj->country; + $this->country = $obj->country; return 1; } @@ -386,7 +386,7 @@ class Establishment extends CommonObject return ''; } - + /** * Initialise object with example values * Id must be 0 if object instance is a specimen @@ -397,5 +397,5 @@ class Establishment extends CommonObject { $this->id = 0; $this->ref = 'DEAAA'; - } + } } diff --git a/htdocs/install/default.css b/htdocs/install/default.css index 6ea6d451e92..2e005a30b21 100644 --- a/htdocs/install/default.css +++ b/htdocs/install/default.css @@ -1,5 +1,5 @@ -/* Copyright (C) 2004 Rodolphe Quiedeville - * Copyright (C) 2009-2017 Laurent Destailleur +/* Copyright (C) 2004 Rodolphe Quiedeville + * Copyright (C) 2009-2017 Laurent Destailleur * * 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 @@ -89,16 +89,16 @@ div.soustitre { body { margin: 15px 4px 4px; } - - input, input[type=text], input[type=password], select, textarea { - min-width: 20px; + + input, input[type=text], input[type=password], select, textarea { + min-width: 20px; min-height: 1.4em; line-height: 1.4em; padding: .4em .1em; border: 1px solid #BBB; /* max-width: inherit; why this ? */ } - + .hideonsmartphone { display: none; } .noenlargeonsmartphone { width : 50px !important; display: inline !important; } .maxwidthonsmartphone { max-width: 100px; } @@ -120,13 +120,13 @@ div.soustitre { padding-left: 0; padding-right: 0; } - + table.main-inside { padding-left: 1px; padding-right: 1px; line-height: 20px; } - + span.titre { font-size: 90%; font-weight: normal; @@ -146,7 +146,7 @@ input:disabled padding: 0 0 0 0; margin: 0 0 0 0; color: #AAA !important; - cursor: not-allowed !important; + cursor: not-allowed !important; } input[type=submit] { @@ -212,7 +212,7 @@ table.listofchoices, table.listofchoices tr, table.listofchoices td { } .blinkwait { font-weight: bold; - text-decoration:blink !important; + text-decoration:blink !important; } .installchoices table tr td { diff --git a/htdocs/printing/index.php b/htdocs/printing/index.php index 384d0834cc0..020f16fd3ec 100644 --- a/htdocs/printing/index.php +++ b/htdocs/printing/index.php @@ -49,19 +49,19 @@ print $langs->trans("DirectPrintingJobsDesc").'

'; // List Jobs from printing modules $object = new PrintingDriver($db); $result = $object->listDrivers($db, 10); -foreach ($result as $driver) +foreach ($result as $driver) { require_once DOL_DOCUMENT_ROOT.'/core/modules/printing/'.$driver.'.modules.php'; $classname = 'printing_'.$driver; $langs->load($driver); $printer = new $classname($db); - if ($conf->global->{$printer->active}) + if ($conf->global->{$printer->active}) { //$printer->list_jobs('commande'); $result = $printer->list_jobs(); print $printer->resprint; - - if ($result > 0) + + if ($result > 0) { setEventMessages($printer->error, $printer->errors, 'errors'); } diff --git a/htdocs/public/demo/demo.css b/htdocs/public/demo/demo.css index c4624f2d943..d137b7be456 100644 --- a/htdocs/public/demo/demo.css +++ b/htdocs/public/demo/demo.css @@ -16,19 +16,19 @@ a:hover { border: 1px solid #bbb; border-radius: 8px; -moz-border-radius: 8px; - box-shadow: 2px 2px 8px #BBB; + box-shadow: 2px 2px 8px #BBB; } .CTable { padding: 6px; font-weight: normal; color: #444444 !important; - + margin: 8px 0px 8px 2px; - + /*border: 1px solid #bbb; border-radius: 8px; -moz-border-radius: 8px;*/ - + background: -webkit-linear-gradient(bottom, rgb(255,255,255) 85%, rgb(255,255,255) 100%); } .csscolumns { @@ -129,4 +129,4 @@ img.demothumb { margin-left: 0px; margin-right: 0px; } -} \ No newline at end of file +} diff --git a/htdocs/public/notice.php b/htdocs/public/notice.php index 623baa2020a..3b25349324c 100644 --- a/htdocs/public/notice.php +++ b/htdocs/public/notice.php @@ -19,13 +19,13 @@ * \file htdocs/public/notice.php * \brief Dolibarr page to show a notice. * Default notice is a message to say network connection is off. - * You can also call this page with URL: + * You can also call this page with URL: * /public/notice.php?lang=xx_XX&transkey=translation_key (key must be inside file main.lang, error.lang or other.lang) * /public/notice.php?transphrase=url_encoded_sentence_to_show */ define('NOCSRFCHECK',1); -define('NOLOGIN',1); +define('NOLOGIN',1); require '../main.inc.php'; @@ -43,8 +43,8 @@ else { $langs->load("error"); $langs->load("other"); - - if (GETPOST('transphrase')) print GETPOST('transphrase'); + + if (GETPOST('transphrase')) print GETPOST('transphrase'); if (GETPOST('transkey')) print $langs->trans(GETPOST('transkey')); }