diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 3364dcb8a1f..a86a751dcb5 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3918,7 +3918,7 @@ class Commande extends CommonOrder if (!dol_strlen($modele)) { $modele = 'einstein'; - if (! empty($this->modelpdf)) { + if (!empty($this->modelpdf)) { $modele = $this->modelpdf; } elseif (!empty($conf->global->COMMANDE_ADDON_PDF)) { $modele = $conf->global->COMMANDE_ADDON_PDF; diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index c7e336a279c..6c1b77fb58b 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -262,7 +262,7 @@ print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sort $topicmail = "Information"; //$modelmail="subscription"; $objecttmp = new Account($db); -$trackid='bank'.$object->id; +$trackid = 'bank'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; if ($sall) diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index e8d97f28e29..e4187a4e906 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -562,7 +562,7 @@ class FactureRec extends CommonInvoice $this->note_private = $obj->note_private; $this->note_public = $obj->note_public; $this->user_author = $obj->fk_user_author; - $this->modelpdf = $obj->model_pdf; // deprecatd + $this->modelpdf = $obj->model_pdf; // deprecatd $this->model_pdf = $obj->model_pdf; $this->rang = $obj->rang; $this->special_code = $obj->special_code; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index cbb59378c89..5049ed41e57 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -627,7 +627,7 @@ class Facture extends CommonInvoice $sql .= ", ".($this->remise_absolue > 0 ? $this->remise_absolue : 'NULL'); $sql .= ", ".($this->remise_percent > 0 ? $this->remise_percent : 'NULL'); $sql .= ", '".$this->db->idate($this->date)."'"; - $sql .= ", ".(empty($this->date_pointoftax) ? "null": "'".$this->db->idate($this->date_pointoftax)."'"); + $sql .= ", ".(empty($this->date_pointoftax) ? "null" : "'".$this->db->idate($this->date_pointoftax)."'"); $sql .= ", ".($this->note_private ? "'".$this->db->escape($this->note_private)."'" : "null"); $sql .= ", ".($this->note_public ? "'".$this->db->escape($this->note_public)."'" : "null"); $sql .= ", ".($this->ref_client ? "'".$this->db->escape($this->ref_client)."'" : "null"); @@ -1057,7 +1057,7 @@ class Facture extends CommonInvoice $facture->note_public = $this->note_public; $facture->note_private = $this->note_private; $facture->ref_client = $this->ref_client; - $facture->modelpdf = $this->modelpdf; // deprecated + $facture->modelpdf = $this->modelpdf; // deprecated $facture->model_pdf = $this->modelpdf; $facture->fk_project = $this->fk_project; $facture->cond_reglement_id = $this->cond_reglement_id; @@ -4338,7 +4338,7 @@ class Facture extends CommonInvoice $modele = 'crabe'; $thisTypeConfName = 'FACTURE_ADDON_PDF_'.$this->type; - if (! empty($this->modelpdf)) { + if (!empty($this->modelpdf)) { $modele = $this->modelpdf; } elseif (!empty($conf->global->$thisTypeConfName)) { $modele = $conf->global->$thisTypeConfName; diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 1ed59f61f19..99544b1037d 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -727,7 +727,7 @@ class Contrat extends CommonObject $this->note_private = $obj->note_private; $this->note_public = $obj->note_public; $this->model_pdf = $obj->model_pdf; - $this->modelpdf = $obj->model_pdf; // deprecated + $this->modelpdf = $obj->model_pdf; // deprecated $this->fk_projet = $obj->fk_project; // deprecated $this->fk_project = $obj->fk_project; @@ -2419,7 +2419,7 @@ class Contrat extends CommonObject if (!dol_strlen($modele)) { $modele = 'strato'; - if (! empty($this->modelpdf)) { + if (!empty($this->modelpdf)) { $modele = $this->modelpdf; } elseif (!empty($conf->global->CONTRACT_ADDON_PDF)) { $modele = $conf->global->CONTRACT_ADDON_PDF; diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 1a6d7f5d319..75d95eaa21b 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -933,8 +933,8 @@ abstract class CommonInvoiceLine extends CommonObjectLine */ public $total_ttc; - public $date_start_fill; // If set to 1, when invoice is created from a template invoice, it will also auto set the field date_start at creation - public $date_end_fill; // If set to 1, when invoice is created from a template invoice, it will also auto set the field date_end at creation + public $date_start_fill; // If set to 1, when invoice is created from a template invoice, it will also auto set the field date_start at creation + public $date_end_fill; // If set to 1, when invoice is created from a template invoice, it will also auto set the field date_end at creation /** * List of cumulative options: diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index 48a825fc6a6..7908fcaa4ba 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -628,7 +628,7 @@ class modProduct extends DolibarrModules $this->import_label[$r] = "SuppliersPricesOfProductsOrServices"; // Translation key $this->import_icon[$r] = $this->picto; $this->import_entities_array[$r] = array(); // We define here only fields that use another icon that the one defined into import_icon - $this->import_tables_array[$r] = array('sp'=>MAIN_DB_PREFIX.'product_fournisseur_price','extra'=>MAIN_DB_PREFIX.'product_fournisseur_price_extrafields'); + $this->import_tables_array[$r] = array('sp'=>MAIN_DB_PREFIX.'product_fournisseur_price', 'extra'=>MAIN_DB_PREFIX.'product_fournisseur_price_extrafields'); $this->import_tables_creator_array[$r] = array('sp'=>'fk_user'); $this->import_fields_array[$r] = array(//field order as per structure of table llx_product_fournisseur_price, without optional fields 'sp.fk_product'=>"ProductOrService*", @@ -670,13 +670,13 @@ class modProduct extends DolibarrModules $resql = $this->db->query($sql); if ($resql) // This can fail when class is used on old database (during migration for example) { - while ($obj = $this->db->fetch_object($resql)) - { - $fieldname = 'extra.'.$obj->name; - $fieldlabel = ucfirst($obj->label); - $this->import_fields_array[$r][$fieldname] = $fieldlabel.($obj->fieldrequired ? '*' : ''); - $import_extrafield_sample[$fieldname] = $fieldlabel; - } + while ($obj = $this->db->fetch_object($resql)) + { + $fieldname = 'extra.'.$obj->name; + $fieldlabel = ucfirst($obj->label); + $this->import_fields_array[$r][$fieldname] = $fieldlabel.($obj->fieldrequired ? '*' : ''); + $import_extrafield_sample[$fieldname] = $fieldlabel; + } } // End add extra fields $this->import_fieldshidden_array[$r] = array('extra.fk_object'=>'lastrowid-'.MAIN_DB_PREFIX.'product_fournisseur_price'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 39c3536b48f..bc97a26d7ff 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -2495,7 +2495,7 @@ class Expedition extends CommonObject if (!dol_strlen($modele)) { $modele = 'rouget'; - if (! empty($this->modelpdf)) { + if (!empty($this->modelpdf)) { $modele = $this->modelpdf; } elseif (!empty($conf->global->EXPEDITION_ADDON_PDF)) { $modele = $conf->global->EXPEDITION_ADDON_PDF; diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 58c806af656..f533d0e7851 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -2207,7 +2207,7 @@ class ExpenseReport extends CommonObject $langs->load("trips"); if (!dol_strlen($modele)) { - if (! empty($this->modelpdf)) { + if (!empty($this->modelpdf)) { $modele = $this->modelpdf; } elseif (!empty($conf->global->EXPENSEREPORT_ADDON_PDF)) { $modele = $conf->global->EXPENSEREPORT_ADDON_PDF; diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 714b955e5f0..d86c1b21abf 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -689,7 +689,7 @@ class Fichinter extends CommonObject if (!dol_strlen($modele)) { $modele = 'soleil'; - if (! empty($this->modelpdf)) { + if (!empty($this->modelpdf)) { $modele = $this->modelpdf; } elseif (!empty($conf->global->FICHEINTER_ADDON_PDF)) { $modele = $conf->global->FICHEINTER_ADDON_PDF; diff --git a/htdocs/fichinter/class/fichinterrec.class.php b/htdocs/fichinter/class/fichinterrec.class.php index 9c733d1c5a6..23940c04e70 100644 --- a/htdocs/fichinter/class/fichinterrec.class.php +++ b/htdocs/fichinter/class/fichinterrec.class.php @@ -281,7 +281,7 @@ class FichinterRec extends Fichinter $this->note_public = $obj->note_public; $this->user_author = $obj->fk_user_author; $this->model_pdf = $obj->model_pdf; - $this->modelpdf = $obj->model_pdf; // deprecated + $this->modelpdf = $obj->model_pdf; // deprecated $this->rang = $obj->rang; $this->special_code = $obj->special_code; $this->frequency = $obj->frequency; diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index a16ac3cd8fd..2df22bc933e 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1900,7 +1900,7 @@ class Task extends CommonObject if (!dol_strlen($modele)) { $modele = 'nodefault'; - if (! empty($this->modelpdf)) { + if (!empty($this->modelpdf)) { $modele = $this->modelpdf; } elseif (!empty($conf->global->PROJECT_TASK_ADDON_PDF)) { $modele = $conf->global->PROJECT_TASK_ADDON_PDF; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index bfca37a31e2..e67f28c4dab 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1660,7 +1660,7 @@ class Societe extends CommonObject $this->note_private = $obj->note_private; $this->note_public = $obj->note_public; $this->model_pdf = $obj->model_pdf; - $this->modelpdf = $obj->model_pdf; // deprecated + $this->modelpdf = $obj->model_pdf; // deprecated $this->default_lang = $obj->default_lang; $this->logo = $obj->logo; $this->logo_squarred = $obj->logo_squarred; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index e375e05ffc1..31c884e9f2c 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -949,15 +949,15 @@ class User extends CommonObject $perms = $obj->perms; $subperms = $obj->subperms; - if (! empty($perms)) { + if (!empty($perms)) { if (!isset($this->rights) || !is_object($this->rights)) { $this->rights = new stdClass(); // For avoid error } - if (! empty($module)) { + if (!empty($module)) { if (!isset($this->rights->$module) || !is_object($this->rights->$module)) { $this->rights->$module = new stdClass(); } - if (! empty($subperms)) { + if (!empty($subperms)) { if (!isset($this->rights->$module->$perms) || !is_object($this->rights->$module->$perms)) { $this->rights->$module->$perms = new stdClass(); } @@ -1015,15 +1015,15 @@ class User extends CommonObject $perms = $obj->perms; $subperms = $obj->subperms; - if (! empty($perms)) { + if (!empty($perms)) { if (!isset($this->rights) || !is_object($this->rights)) { $this->rights = new stdClass(); // For avoid error } - if (! empty($module)) { + if (!empty($module)) { if (!isset($this->rights->$module) || !is_object($this->rights->$module)) { $this->rights->$module = new stdClass(); } - if (! empty($subperms)) { + if (!empty($subperms)) { if (!isset($this->rights->$module->$perms) || !is_object($this->rights->$module->$perms)) { $this->rights->$module->$perms = new stdClass(); }