trim trailing

This commit is contained in:
Frédéric FRANCE 2018-07-26 18:05:20 +02:00
parent 39f5641fed
commit c991a4d204
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
10 changed files with 49 additions and 41 deletions

View File

@ -177,7 +177,15 @@
<property name="ignoreBlankLines" value="true"/> <property name="ignoreBlankLines" value="true"/>
</properties> </properties>
</rule> </rule>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile">
<severity>0</severity>
</rule>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile">
<severity>0</severity>
</rule>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines">
<severity>0</severity>
</rule>
<!-- Rules from PEAR Standard --> <!-- Rules from PEAR Standard -->
<rule ref="PEAR.Classes.ClassDeclaration" /> <rule ref="PEAR.Classes.ClassDeclaration" />

View File

@ -82,7 +82,7 @@ $socid = GETPOST("socid", 'int');
$object = new Societe($db); $object = new Societe($db);
$object->id = $socid; $object->id = $socid;
$result = $object->fetch($socid); $result = $object->fetch($socid);
if ($result < 0) if ($result < 0)
{ {
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
} }

View File

@ -86,7 +86,7 @@ $socid = GETPOST("socid", 'int');
$object = new Societe($db); $object = new Societe($db);
$object->id = $socid; $object->id = $socid;
$result = $object->fetch($socid); $result = $object->fetch($socid);
if ($result<0) if ($result<0)
{ {
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
} }

View File

@ -700,8 +700,8 @@ if (empty($reshook))
if ($res = $prodcomb->fetchByProductCombination2ValuePairs($idprod, $combinations)) { if ($res = $prodcomb->fetchByProductCombination2ValuePairs($idprod, $combinations)) {
$idprod = $res->fk_product_child; $idprod = $res->fk_product_child;
} }
else else
{ {
setEventMessages($langs->trans('ErrorProductCombinationNotFound'), null, 'errors'); setEventMessages($langs->trans('ErrorProductCombinationNotFound'), null, 'errors');
$error ++; $error ++;

View File

@ -31,10 +31,10 @@ class BankCateg // extends CommonObject
//public $element='bank_categ'; //!< Id that identify managed objects //public $element='bank_categ'; //!< Id that identify managed objects
//public $table_element='bank_categ'; //!< Name of table without prefix where object is stored //public $table_element='bank_categ'; //!< Name of table without prefix where object is stored
public $picto='generic'; public $picto='generic';
public $id; public $id;
public $label; public $label;
/** /**
* Constructor * Constructor
@ -205,7 +205,7 @@ class BankCateg // extends CommonObject
{ {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_account"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_account";
$sql.= " WHERE fk_categorie = ".$this->id; $sql.= " WHERE fk_categorie = ".$this->id;
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if (!$resql) if (!$resql)
{ {
@ -213,13 +213,13 @@ class BankCateg // extends CommonObject
$this->errors[] = "Error ".$this->db->lasterror(); $this->errors[] = "Error ".$this->db->lasterror();
} }
} }
// Delete link between tag and bank lines // Delete link between tag and bank lines
if (! $error) if (! $error)
{ {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class";
$sql.= " WHERE fk_categ = ".$this->id; $sql.= " WHERE fk_categ = ".$this->id;
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if (!$resql) if (!$resql)
{ {
@ -227,21 +227,21 @@ class BankCateg // extends CommonObject
$this->errors[] = "Error ".$this->db->lasterror(); $this->errors[] = "Error ".$this->db->lasterror();
} }
} }
// Delete bank categ // Delete bank categ
if (! $error) if (! $error)
{ {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_categ"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_categ";
$sql .= " WHERE rowid=".$this->id; $sql .= " WHERE rowid=".$this->id;
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if (!$resql) if (!$resql)
{ {
$error++; $error++;
$this->errors[] = "Error ".$this->db->lasterror(); $this->errors[] = "Error ".$this->db->lasterror();
} }
} }
// Commit or rollback // Commit or rollback
if ($error) { if ($error) {
foreach ($this->errors as $errmsg) { foreach ($this->errors as $errmsg) {

View File

@ -34,7 +34,7 @@ class Establishment extends CommonObject
public $fk_element = 'fk_establishment'; 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 $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
public $picto='building'; public $picto='building';
public $id; public $id;
public $ref; public $ref;
public $rowid; public $rowid;
@ -208,7 +208,7 @@ class Establishment extends CommonObject
$this->country_id = $obj->country_id; $this->country_id = $obj->country_id;
$this->country_code = $obj->country_code; $this->country_code = $obj->country_code;
$this->country = $obj->country; $this->country = $obj->country;
return 1; return 1;
} }
@ -386,7 +386,7 @@ class Establishment extends CommonObject
return ''; return '';
} }
/** /**
* Initialise object with example values * Initialise object with example values
* Id must be 0 if object instance is a specimen * Id must be 0 if object instance is a specimen
@ -397,5 +397,5 @@ class Establishment extends CommonObject
{ {
$this->id = 0; $this->id = 0;
$this->ref = 'DEAAA'; $this->ref = 'DEAAA';
} }
} }

View File

@ -1,5 +1,5 @@
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2009-2017 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2009-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -89,16 +89,16 @@ div.soustitre {
body { body {
margin: 15px 4px 4px; margin: 15px 4px 4px;
} }
input, input[type=text], input[type=password], select, textarea { input, input[type=text], input[type=password], select, textarea {
min-width: 20px; min-width: 20px;
min-height: 1.4em; min-height: 1.4em;
line-height: 1.4em; line-height: 1.4em;
padding: .4em .1em; padding: .4em .1em;
border: 1px solid #BBB; border: 1px solid #BBB;
/* max-width: inherit; why this ? */ /* max-width: inherit; why this ? */
} }
.hideonsmartphone { display: none; } .hideonsmartphone { display: none; }
.noenlargeonsmartphone { width : 50px !important; display: inline !important; } .noenlargeonsmartphone { width : 50px !important; display: inline !important; }
.maxwidthonsmartphone { max-width: 100px; } .maxwidthonsmartphone { max-width: 100px; }
@ -120,13 +120,13 @@ div.soustitre {
padding-left: 0; padding-left: 0;
padding-right: 0; padding-right: 0;
} }
table.main-inside { table.main-inside {
padding-left: 1px; padding-left: 1px;
padding-right: 1px; padding-right: 1px;
line-height: 20px; line-height: 20px;
} }
span.titre { span.titre {
font-size: 90%; font-size: 90%;
font-weight: normal; font-weight: normal;
@ -146,7 +146,7 @@ input:disabled
padding: 0 0 0 0; padding: 0 0 0 0;
margin: 0 0 0 0; margin: 0 0 0 0;
color: #AAA !important; color: #AAA !important;
cursor: not-allowed !important; cursor: not-allowed !important;
} }
input[type=submit] { input[type=submit] {
@ -212,7 +212,7 @@ table.listofchoices, table.listofchoices tr, table.listofchoices td {
} }
.blinkwait { .blinkwait {
font-weight: bold; font-weight: bold;
text-decoration:blink !important; text-decoration:blink !important;
} }
.installchoices table tr td { .installchoices table tr td {

View File

@ -49,19 +49,19 @@ print $langs->trans("DirectPrintingJobsDesc").'<br><br>';
// List Jobs from printing modules // List Jobs from printing modules
$object = new PrintingDriver($db); $object = new PrintingDriver($db);
$result = $object->listDrivers($db, 10); $result = $object->listDrivers($db, 10);
foreach ($result as $driver) foreach ($result as $driver)
{ {
require_once DOL_DOCUMENT_ROOT.'/core/modules/printing/'.$driver.'.modules.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/printing/'.$driver.'.modules.php';
$classname = 'printing_'.$driver; $classname = 'printing_'.$driver;
$langs->load($driver); $langs->load($driver);
$printer = new $classname($db); $printer = new $classname($db);
if ($conf->global->{$printer->active}) if ($conf->global->{$printer->active})
{ {
//$printer->list_jobs('commande'); //$printer->list_jobs('commande');
$result = $printer->list_jobs(); $result = $printer->list_jobs();
print $printer->resprint; print $printer->resprint;
if ($result > 0) if ($result > 0)
{ {
setEventMessages($printer->error, $printer->errors, 'errors'); setEventMessages($printer->error, $printer->errors, 'errors');
} }

View File

@ -16,19 +16,19 @@ a:hover {
border: 1px solid #bbb; border: 1px solid #bbb;
border-radius: 8px; border-radius: 8px;
-moz-border-radius: 8px; -moz-border-radius: 8px;
box-shadow: 2px 2px 8px #BBB; box-shadow: 2px 2px 8px #BBB;
} }
.CTable { .CTable {
padding: 6px; padding: 6px;
font-weight: normal; font-weight: normal;
color: #444444 !important; color: #444444 !important;
margin: 8px 0px 8px 2px; margin: 8px 0px 8px 2px;
/*border: 1px solid #bbb; /*border: 1px solid #bbb;
border-radius: 8px; border-radius: 8px;
-moz-border-radius: 8px;*/ -moz-border-radius: 8px;*/
background: -webkit-linear-gradient(bottom, rgb(255,255,255) 85%, rgb(255,255,255) 100%); background: -webkit-linear-gradient(bottom, rgb(255,255,255) 85%, rgb(255,255,255) 100%);
} }
.csscolumns { .csscolumns {
@ -129,4 +129,4 @@ img.demothumb {
margin-left: 0px; margin-left: 0px;
margin-right: 0px; margin-right: 0px;
} }
} }

View File

@ -19,13 +19,13 @@
* \file htdocs/public/notice.php * \file htdocs/public/notice.php
* \brief Dolibarr page to show a notice. * \brief Dolibarr page to show a notice.
* Default notice is a message to say network connection is off. * 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?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 * /public/notice.php?transphrase=url_encoded_sentence_to_show
*/ */
define('NOCSRFCHECK',1); define('NOCSRFCHECK',1);
define('NOLOGIN',1); define('NOLOGIN',1);
require '../main.inc.php'; require '../main.inc.php';
@ -43,8 +43,8 @@ else
{ {
$langs->load("error"); $langs->load("error");
$langs->load("other"); $langs->load("other");
if (GETPOST('transphrase')) print GETPOST('transphrase'); if (GETPOST('transphrase')) print GETPOST('transphrase');
if (GETPOST('transkey')) print $langs->trans(GETPOST('transkey')); if (GETPOST('transkey')) print $langs->trans(GETPOST('transkey'));
} }