';
diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php
index 4f8c6b28d41..e6a94b21701 100644
--- a/htdocs/categories/class/categorie.class.php
+++ b/htdocs/categories/class/categorie.class.php
@@ -244,7 +244,6 @@ class Categorie extends CommonObject
* @see Categorie::TYPE_ACTIONCOMM
* @see Categorie::TYPE_WEBSITE_PAGE
* @see Categorie::TYPE_TICKET
-
*/
public $type;
@@ -385,8 +384,8 @@ class Categorie extends CommonObject
}
} else {
dol_print_error($this->db);
- $this->error=$this->db->lasterror;
- $this->errors[]=$this->db->lasterror;
+ $this->error = $this->db->lasterror;
+ $this->errors[] = $this->db->lasterror;
return -1;
}
}
diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php
index 55540b3006f..7cdb056c595 100644
--- a/htdocs/comm/action/pertype.php
+++ b/htdocs/comm/action/pertype.php
@@ -965,8 +965,8 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
// We are in a particular day for $username, now we scan all events
foreach ($eventarray as $daykey => $notused) {
$annee = dol_print_date($daykey, '%Y');
- $mois = dol_print_date($daykey, '%m');
- $jour = dol_print_date($daykey, '%d');
+ $mois = dol_print_date($daykey, '%m');
+ $jour = dol_print_date($daykey, '%d');
if ($day == $jour && $month == $mois && $year == $annee) { // Is it the day we are looking for when calling function ?
// Scan all event for this date
diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php
index fddf7a2879f..8abbdaa0dd3 100644
--- a/htdocs/compta/accounting-files.php
+++ b/htdocs/compta/accounting-files.php
@@ -578,7 +578,7 @@ print '
';
foreach ($listofchoices as $choice => $val) {
if (empty($val['enabled'])) {
- continue; // list not qualified
+ continue; // list not qualified
}
$disabled = '';
if (empty($val['perms'])) {
diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php
index 3b078698728..d4245594447 100644
--- a/htdocs/compta/bank/various_payment/card.php
+++ b/htdocs/compta/bank/various_payment/card.php
@@ -540,7 +540,7 @@ if ($id) {
array('type' => 'date', 'name' => 'clone_date_value', 'label' => $langs->trans("DateValue"), 'value' => -1),
array('type' => 'other', 'tdclass'=>'fieldrequired', 'name' => 'clone_accountid', 'label' => $langs->trans("BankAccount"), 'value' => $form->select_comptes($object->fk_account, "accountid", 0, '', 1, '', 0, 'minwidth200', 1)),
array('type' => 'text', 'name' => 'clone_amount', 'label' => $langs->trans("Amount"), 'value' => price($object->amount)),
- array('type' => 'select', 'name' => 'clone_sens', 'label' => $langs->trans("Sens") . ' ' . $set_value_help, 'values' => $sensarray, 'default' => $object->sens),
+ array('type' => 'select', 'name' => 'clone_sens', 'label' => $langs->trans("Sens").' '.$set_value_help, 'values' => $sensarray, 'default' => $object->sens),
);
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneVariousPayment', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 350);
diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php
index b589607ac37..100334e046a 100644
--- a/htdocs/compta/facture/class/facture-rec.class.php
+++ b/htdocs/compta/facture/class/facture-rec.class.php
@@ -126,8 +126,8 @@ class FactureRec extends CommonInvoice
public $suspended; // status
- public $auto_validate; // 0 to create in draft, 1 to create and validate the new invoice
- public $generate_pdf; // 1 to generate PDF on invoice generation (default)
+ public $auto_validate; // 0 to create in draft, 1 to create and validate the new invoice
+ public $generate_pdf; // 1 to generate PDF on invoice generation (default)
/**
* @var int 1 if status is draft
@@ -712,12 +712,12 @@ class FactureRec extends CommonInvoice
//$line->code_ventilation = $objp->fk_code_ventilation;
$line->fk_product_fournisseur_price = $objp->fk_product_fournisseur_price;
- $line->fk_fournprice = $objp->fk_product_fournisseur_price; // For backward compatibility
+ $line->fk_fournprice = $objp->fk_product_fournisseur_price; // For backward compatibility
$marginInfos = getMarginInfos($objp->subprice, $objp->remise_percent, $objp->tva_tx, $objp->localtax1_tx, $objp->localtax2_tx, $objp->fk_product_fournisseur_price, $objp->pa_ht);
$line->buyprice = $marginInfos[0];
- $line->pa_ht = $marginInfos[0]; // For backward compatibility
+ $line->pa_ht = $marginInfos[0]; // For backward compatibility
$line->marge_tx = $marginInfos[1];
$line->marque_tx = $marginInfos[2];
$line->rang = $objp->rang;
@@ -1930,14 +1930,14 @@ class FactureLigneRec extends CommonInvoiceLine
public $fk_product_fournisseur_price;
- public $fk_fournprice; // For backward compatibility
+ public $fk_fournprice; // For backward compatibility
public $rang;
public $desc;
public $description;
- public $fk_product_type; // Use instead product_type
+ public $fk_product_type; // Use instead product_type
public $fk_contract_line;
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index 90641062b40..04c1383c4a5 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -1560,8 +1560,11 @@ class Facture extends CommonInvoice
$hookmanager->initHooks(array('invoicedao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result, 'notooltip' => $notooltip, 'addlinktonotes' => $addlinktonotes, 'save_lastsearch_value'=> $save_lastsearch_value, 'target' => $target);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
- if ($reshook > 0) $result = $hookmanager->resPrint;
- else $result .= $hookmanager->resPrint;
+ if ($reshook > 0) {
+ $result = $hookmanager->resPrint;
+ } else {
+ $result .= $hookmanager->resPrint;
+ }
return $result;
}
diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php
index 03dfd0288bd..42bf73eaae6 100644
--- a/htdocs/compta/prelevement/create.php
+++ b/htdocs/compta/prelevement/create.php
@@ -90,10 +90,10 @@ if (empty($reshook)) {
}
}
if ($action == 'create') {
- $default_account=($type == 'bank-transfer' ? 'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT' : 'PRELEVEMENT_ID_BANKACCOUNT');
+ $default_account = ($type == 'bank-transfer' ? 'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT' : 'PRELEVEMENT_ID_BANKACCOUNT');
if ($id_bankaccount != $conf->global->{$default_account}) {
- $res = dolibarr_set_const($db, $default_account, $id_bankaccount, 'chaine', 0, '', $conf->entity); //Set as default
+ $res = dolibarr_set_const($db, $default_account, $id_bankaccount, 'chaine', 0, '', $conf->entity); //Set as default
}
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
index fa95b08faca..9a4b50e3474 100644
--- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
+++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
@@ -600,7 +600,7 @@ class PaymentSocialContribution extends CommonObject
$result = $acc->add_url_line(
$bank_line_id,
$socialcontrib->fk_user,
- DOL_URL_ROOT . '/user/card.php?id=',
+ DOL_URL_ROOT.'/user/card.php?id=',
$fuser->getFullName($langs),
'user'
);
diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index f30ff3ead4c..b7648da956d 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -505,8 +505,8 @@ if (empty($reshook)) {
$desc = $prod->description;
//If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time
- if ($product_desc==$desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) {
- $product_desc='';
+ if ($product_desc == $desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) {
+ $product_desc = '';
}
if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) {
diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php
index f46c1051c53..63b4b3f7fc6 100644
--- a/htdocs/core/ajax/ajaxdirpreview.php
+++ b/htdocs/core/ajax/ajaxdirpreview.php
@@ -218,8 +218,8 @@ if ($type == 'directory') {
$parameters = array('modulepart'=>$module);
$reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters);
- if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray)>0) {
- $automodules[]=$hookmanager->resArray['module'];
+ if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray) > 0) {
+ $automodules[] = $hookmanager->resArray['module'];
}
// TODO change for multicompany sharing
diff --git a/htdocs/core/boxes/box_customers_outstanding_bill_reached.php b/htdocs/core/boxes/box_customers_outstanding_bill_reached.php
index 4077b04c6d9..22fafb4633c 100644
--- a/htdocs/core/boxes/box_customers_outstanding_bill_reached.php
+++ b/htdocs/core/boxes/box_customers_outstanding_bill_reached.php
@@ -35,7 +35,7 @@ class box_customers_outstanding_bill_reached extends ModeleBoxes
public $boxcode = "customersoutstandingbillreached";
public $boximg = "object_company";
public $boxlabel = "BoxCustomersOutstandingBillReached";
- public $depends = array("facture","societe");
+ public $depends = array("facture", "societe");
/**
* @var DoliDB Database handler.
diff --git a/htdocs/core/boxes/box_funnel_of_prospection.php b/htdocs/core/boxes/box_funnel_of_prospection.php
index 28c3b22788d..fd89e732937 100644
--- a/htdocs/core/boxes/box_funnel_of_prospection.php
+++ b/htdocs/core/boxes/box_funnel_of_prospection.php
@@ -24,7 +24,7 @@
* \ingroup projet
* \brief Module to show the funnel of prospection
*/
-include_once DOL_DOCUMENT_ROOT . "/core/boxes/modules_boxes.php";
+include_once DOL_DOCUMENT_ROOT."/core/boxes/modules_boxes.php";
/**
* Class to manage the box to show last projet
@@ -91,8 +91,8 @@ class box_funnel_of_prospection extends ModeleBoxes
$badgeStatus7 = '#baa32b';
$badgeStatus8 = '#993013';
$badgeStatus9 = '#e7f0f0';
- if (file_exists(DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php')) {
- include DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php';
+ if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php')) {
+ include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
}
$listofoppstatus = array();
$listofopplabel = array();
@@ -100,7 +100,7 @@ class box_funnel_of_prospection extends ModeleBoxes
$colorseriesstat = array();
$bordercolorseries = array();
$sql = "SELECT cls.rowid, cls.code, cls.percent, cls.label";
- $sql .= " FROM " . MAIN_DB_PREFIX . "c_lead_status as cls";
+ $sql .= " FROM ".MAIN_DB_PREFIX."c_lead_status as cls";
$sql .= " WHERE active=1";
$sql .= " AND cls.code <> 'LOST'";
$sql .= $this->db->order('cls.rowid', 'ASC');
@@ -148,14 +148,14 @@ class box_funnel_of_prospection extends ModeleBoxes
$this->max = $max;
$this->info_box_head = array(
- 'text' => $langs->trans("Statistics") . ' - ' . $langs->trans("BoxTitleFunnelOfProspection"),
+ 'text' => $langs->trans("Statistics").' - '.$langs->trans("BoxTitleFunnelOfProspection"),
'graph' => '1'
);
if ($user->rights->projet->lire || !empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
$sql = "SELECT p.fk_opp_status as opp_status, cls.code, COUNT(p.rowid) as nb, SUM(p.opp_amount) as opp_amount, SUM(p.opp_amount * p.opp_percent) as ponderated_opp_amount";
- $sql .= " FROM " . MAIN_DB_PREFIX . "projet as p, " . MAIN_DB_PREFIX . "c_lead_status as cls";
- $sql .= " WHERE p.entity IN (" . getEntity('project') . ")";
+ $sql .= " FROM ".MAIN_DB_PREFIX."projet as p, ".MAIN_DB_PREFIX."c_lead_status as cls";
+ $sql .= " WHERE p.entity IN (".getEntity('project').")";
$sql .= " AND p.fk_opp_status = cls.rowid";
$sql .= " AND p.fk_statut = 1"; // Opend projects only
$sql .= " AND cls.code NOT IN ('LOST')";
@@ -200,14 +200,14 @@ class box_funnel_of_prospection extends ModeleBoxes
$liststatus = array();
$data = array('');
$customlabels = array();
- $total=0;
+ $total = 0;
foreach ($listofstatus as $status) {
$customlabel = '';
$labelStatus = '';
if ($status != 7) {
$code = dol_getIdFromCode($this->db, $status, 'c_lead_status', 'rowid', 'code');
if ($code) {
- $labelStatus = $langs->transnoentitiesnoconv("OppStatus" . $code);
+ $labelStatus = $langs->transnoentitiesnoconv("OppStatus".$code);
}
if (empty($labelStatus)) {
$labelStatus = $listofopplabel[$status];
@@ -218,16 +218,16 @@ class box_funnel_of_prospection extends ModeleBoxes
$liststatus[] = $labelStatus;
if (!$conf->use_javascript_ajax) {
$stringtoprint .= '
';
- $stringtoprint .= '| ' . $labelStatus . ' | ';
- $stringtoprint .= '' . price((isset($valsamount[$status]) ? (float) $valsamount[$status] : 0), 0, '', 1, -1, -1, $conf->currency) . ' | ';
+ $stringtoprint .= ''.$labelStatus.' | ';
+ $stringtoprint .= ''.price((isset($valsamount[$status]) ? (float) $valsamount[$status] : 0), 0, '', 1, -1, -1, $conf->currency).' | ';
$stringtoprint .= "
\n";
}
}
- $customlabels[]=$customlabel;
+ $customlabels[] = $customlabel;
}
$dataseries[] = $data;
if ($conf->use_javascript_ajax) {
- include_once DOL_DOCUMENT_ROOT . '/core/class/dolgraph.class.php';
+ include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
$dolgraph = new DolGraph();
$dolgraph->SetMinValue(0);
$dolgraph->SetData($dataseries);
@@ -273,7 +273,7 @@ class box_funnel_of_prospection extends ModeleBoxes
'tr' => 'class="oddeven"',
'td' => 'class="left "',
'maxlength' => 500,
- 'text' => $langs->trans("OpportunityTotalAmount") . ' (' . $langs->trans("WonLostExcluded") . ')'
+ 'text' => $langs->trans("OpportunityTotalAmount").' ('.$langs->trans("WonLostExcluded").')'
);
$this->info_box_contents[$line][] = array(
'tr' => 'class="oddeven"',
@@ -286,7 +286,7 @@ class box_funnel_of_prospection extends ModeleBoxes
'tr' => 'class="oddeven"',
'td' => 'class="left "',
'maxlength' => 500,
- 'text' => $form->textwithpicto($langs->trans("OpportunityPonderatedAmount") . ' (' . $langs->trans("WonLostExcluded") . ')', $langs->trans("OpportunityPonderatedAmountDesc"), 1)
+ 'text' => $form->textwithpicto($langs->trans("OpportunityPonderatedAmount").' ('.$langs->trans("WonLostExcluded").')', $langs->trans("OpportunityPonderatedAmountDesc"), 1)
);
$this->info_box_contents[$line][] = array(
diff --git a/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php b/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php
index 83acae25b45..1c0e7a6e3ff 100644
--- a/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php
+++ b/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php
@@ -80,8 +80,8 @@ class box_graph_nb_ticket_last_x_days extends ModeleBoxes
$badgeStatus7 = '#baa32b';
$badgeStatus8 = '#993013';
$badgeStatus9 = '#e7f0f0';
- if (file_exists(DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php')) {
- include DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php';
+ if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php')) {
+ include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
}
$this->max = $max;
@@ -97,22 +97,22 @@ class box_graph_nb_ticket_last_x_days extends ModeleBoxes
$days = 7;
}
require_once DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php";
- $text = $langs->trans("BoxTicketLastXDays", $days).' ' . img_picto('', 'filter.png', 'id="idsubimgDOLUSERCOOKIE_ticket_last_days" class="linkobject"');
+ $text = $langs->trans("BoxTicketLastXDays", $days).' '.img_picto('', 'filter.png', 'id="idsubimgDOLUSERCOOKIE_ticket_last_days" class="linkobject"');
$this->info_box_head = array(
'text' => $text,
'limit' => dol_strlen($text)
);
$today = date_time_set(date_create(), 0, 0);
$todayformat = date('Y-m-d', date_timestamp_get($today));
- $intervaltosub = new DateInterval('P' . dol_escape_htmltag($days - 1) . 'D');
+ $intervaltosub = new DateInterval('P'.dol_escape_htmltag($days - 1).'D');
$intervaltoadd = new DateInterval('P1D');
$minimumdatec = date_sub($today, $intervaltosub);
$minimumdatecformated = date('Y-m-d', date_timestamp_get($minimumdatec));
if ($user->rights->ticket->read) {
$sql = "SELECT CAST(t.datec AS DATE) as datec, COUNT(t.datec) as nb";
- $sql .= " FROM " . MAIN_DB_PREFIX . "ticket as t";
- $sql .= " WHERE CAST(t.datec AS DATE) > DATE_SUB(CURRENT_DATE, INTERVAL " . $days . " DAY)";
+ $sql .= " FROM ".MAIN_DB_PREFIX."ticket as t";
+ $sql .= " WHERE CAST(t.datec AS DATE) > DATE_SUB(CURRENT_DATE, INTERVAL ".$days." DAY)";
$sql .= " GROUP BY CAST(t.datec AS DATE)";
$resql = $this->db->query($sql);
if ($resql) {
@@ -148,12 +148,12 @@ class box_graph_nb_ticket_last_x_days extends ModeleBoxes
});
';
$stringtoshow .= '
'; // hideobject is to start hidden
- $stringtoshow .= '';
$stringtoshow .= '
';
@@ -181,21 +181,21 @@ class box_graph_nb_ticket_last_x_days extends ModeleBoxes
$px1->mode = 'depth';
$px1->draw('idgraphticketlastxdays');
- $graphtoshow= $px1->show($totalnb ? 0 : 1);
+ $graphtoshow = $px1->show($totalnb ? 0 : 1);
}
if ($totalnb) {
$stringtoshow .= $graphtoshow;
}
$stringtoshow .= '
';
if ($totalnb) {
- $this->info_box_contents[][]=array(
+ $this->info_box_contents[][] = array(
'td' => 'center',
'text' => $stringtoshow
);
} else {
$this->info_box_contents[0][0] = array(
'td' => 'class="center opacitymedium"',
- 'text' => $stringtoshow . $langs->trans("BoxNoTicketLastXDays", $days)
+ 'text' => $stringtoshow.$langs->trans("BoxNoTicketLastXDays", $days)
);
}
} else {
diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php
index 3b98d3f3356..c7a5beae245 100644
--- a/htdocs/core/class/commoninvoice.class.php
+++ b/htdocs/core/class/commoninvoice.class.php
@@ -970,8 +970,8 @@ abstract class CommonInvoiceLine extends CommonObjectLine
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 $buy_price_ht;
- public $buyprice; // For backward compatibility
- public $pa_ht; // For backward compatibility
+ public $buyprice; // For backward compatibility
+ public $pa_ht; // For backward compatibility
public $marge_tx;
public $marque_tx;
diff --git a/htdocs/core/class/defaultvalues.class.php b/htdocs/core/class/defaultvalues.class.php
index ad69982357c..f6edb58207c 100644
--- a/htdocs/core/class/defaultvalues.class.php
+++ b/htdocs/core/class/defaultvalues.class.php
@@ -88,7 +88,7 @@ class DefaultValues extends CommonObject
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
+ public $fields = array(
'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10),
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>15, 'index'=>1),
'type' =>array('type'=>'varchar(10)', 'label'=>'Type', 'enabled'=>1, 'visible'=>-1, 'position'=>20),
@@ -145,8 +145,12 @@ class DefaultValues extends CommonObject
$this->db = $db;
- if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) $this->fields['rowid']['visible'] = 0;
- if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) $this->fields['entity']['enabled'] = 0;
+ if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) {
+ $this->fields['rowid']['visible'] = 0;
+ }
+ if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) {
+ $this->fields['entity']['enabled'] = 0;
+ }
// Unset fields that are disabled
foreach ($this->fields as $key => $val) {
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index d313d91f505..ffa441c0527 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -500,7 +500,7 @@ class FormFile
$modellist = array();
if ($modulepart == 'company') {
- $showempty = 1; // can have no template active
+ $showempty = 1; // can have no template active
if (is_array($genallowed)) {
$modellist = $genallowed;
} else {
@@ -564,7 +564,7 @@ class FormFile
$modellist = ModelePDFFactures::liste_modeles($this->db);
}
} elseif ($modulepart == 'contract') {
- $showempty = 1; // can have no template active
+ $showempty = 1; // can have no template active
if (is_array($genallowed)) {
$modellist = $genallowed;
} else {
@@ -628,7 +628,7 @@ class FormFile
$modellist = ModelePDFSuppliersOrders::liste_modeles($this->db);
}
} elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice') {
- $showempty = 1; // can have no template active
+ $showempty = 1; // can have no template active
if (is_array($genallowed)) {
$modellist = $genallowed;
} else {
@@ -1708,7 +1708,7 @@ class FormFile
} else {
$parameters = array('modulepart'=>$modulepart);
$reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters);
- if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray)>0) {
+ if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray) > 0) {
if (array_key_exists('classpath', $hookmanager->resArray) && !empty($hookmanager->resArray['classpath'])) {
dol_include_once($hookmanager->resArray['classpath']);
if (array_key_exists('classname', $hookmanager->resArray) && !empty($hookmanager->resArray['classname'])) {
@@ -1789,9 +1789,9 @@ class FormFile
preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg);
$ref = (isset($reg[1]) ? $reg[1] : '');
} else {
- $parameters = array('modulepart'=>$modulepart,'fileinfo'=>$file);
+ $parameters = array('modulepart'=>$modulepart, 'fileinfo'=>$file);
$reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters);
- if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray)>0) {
+ if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray) > 0) {
if (array_key_exists('ref', $hookmanager->resArray) && !empty($hookmanager->resArray['ref'])) {
$ref = $hookmanager->resArray['ref'];
}
diff --git a/htdocs/core/class/infobox.class.php b/htdocs/core/class/infobox.class.php
index 07962e6e98d..adde51c4974 100644
--- a/htdocs/core/class/infobox.class.php
+++ b/htdocs/core/class/infobox.class.php
@@ -151,7 +151,7 @@ class InfoBox
$box->rowid = (empty($obj->rowid) ? '' : $obj->rowid);
$box->id = (empty($obj->box_id) ? '' : $obj->box_id);
$box->position = ((isset($obj->position) && $obj->position == '') ? '' : (isset($obj->position) ? $obj->position : '')); // '0' must stay '0'
- $box->box_order = (empty($obj->box_order) ? '' : $obj->box_order);
+ $box->box_order = (empty($obj->box_order) ? '' : $obj->box_order);
$box->fk_user = (empty($obj->fk_user) ? 0 : $obj->fk_user);
$box->sourcefile = $relsourcefile;
$box->class = $boxname;
diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php
index 4743d4559b6..c287aae1c2f 100644
--- a/htdocs/core/class/smtps.class.php
+++ b/htdocs/core/class/smtps.class.php
@@ -1422,7 +1422,7 @@ class SMTPs
$this->_msgContent[$strType]['dataText'] = $strContentAltText;
if ($this->getMD5flag()) {
- $this->_msgContent[$strType]['md5'] = dol_hash($strContent, 3);
+ $this->_msgContent[$strType]['md5'] = dol_hash($strContent, 3);
}
//}
}
@@ -1622,7 +1622,7 @@ class SMTPs
$this->_msgContent['image'][$strImageName]['data'] = $strContent;
if ($this->getMD5flag()) {
- $this->_msgContent['image'][$strImageName]['md5'] = dol_hash($strContent, 3);
+ $this->_msgContent['image'][$strImageName]['md5'] = dol_hash($strContent, 3);
}
}
}
diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php
index e7ab98ca3b6..d4028e2196b 100644
--- a/htdocs/core/lib/date.lib.php
+++ b/htdocs/core/lib/date.lib.php
@@ -681,7 +681,7 @@ function dol_get_first_day_week($day, $month, $year, $gm = false)
function getGMTEasterDatetime($year)
{
$base = new DateTime("$year-03-21", new DateTimeZone("UTC"));
- $days = easter_days($year); // Return number of days between 21 march and easter day.
+ $days = easter_days($year); // Return number of days between 21 march and easter day.
$tmp = $base->add(new DateInterval("P{$days}D"));
return $tmp->getTimestamp();
}
diff --git a/htdocs/core/lib/import.lib.php b/htdocs/core/lib/import.lib.php
index 54e6d232871..96ad79f03e6 100644
--- a/htdocs/core/lib/import.lib.php
+++ b/htdocs/core/lib/import.lib.php
@@ -48,7 +48,7 @@ function import_prepare_head($param, $maxstep = 0)
if ($i < 6) {
$head[$h][0] = DOL_URL_ROOT.'/imports/import.php?step='.$i.$param;
} else {
- $head[$h][0] = DOL_URL_ROOT.'/imports/import.php?step=5'.$param; // For step6, link is to step 5
+ $head[$h][0] = DOL_URL_ROOT.'/imports/import.php?step=5'.$param; // For step6, link is to step 5
}
$head[$h][1] = $langs->trans("Step")." ".$i;
$head[$h][2] = 'step'.$i;
diff --git a/htdocs/core/lib/memory.lib.php b/htdocs/core/lib/memory.lib.php
index 1300c1b771f..557bbe6dcf5 100644
--- a/htdocs/core/lib/memory.lib.php
+++ b/htdocs/core/lib/memory.lib.php
@@ -76,7 +76,7 @@ function dol_setcache($memoryid, $data, $expire = 0)
}
}
- if (!empty($conf->memcached->enabled) && class_exists('Memcached')) {
+ if (!empty($conf->memcached->enabled) && class_exists('Memcached')) {
// Using a memcached server
global $dolmemcache;
if (empty($dolmemcache) || !is_object($dolmemcache)) {
@@ -88,7 +88,7 @@ function dol_setcache($memoryid, $data, $expire = 0)
}
}
- $memoryid = session_name() . '_' . $memoryid;
+ $memoryid = session_name().'_'.$memoryid;
//$dolmemcache->setOption(Memcached::OPT_COMPRESSION, false);
$dolmemcache->add($memoryid, $data, $expire); // This fails if key already exists
$rescode = $dolmemcache->getResultCode();
@@ -109,7 +109,7 @@ function dol_setcache($memoryid, $data, $expire = 0)
}
}
- $memoryid = session_name() . '_' . $memoryid;
+ $memoryid = session_name().'_'.$memoryid;
//$dolmemcache->setOption(Memcached::OPT_COMPRESSION, false);
$result = $dolmemcache->add($memoryid, $data, false, $expire); // This fails if key already exists
if ($result) {
@@ -154,7 +154,7 @@ function dol_getcache($memoryid)
}
}
- $memoryid = session_name() . '_' . $memoryid;
+ $memoryid = session_name().'_'.$memoryid;
//$m->setOption(Memcached::OPT_COMPRESSION, false);
//print "Get memoryid=".$memoryid;
$data = $m->get($memoryid);
@@ -179,7 +179,7 @@ function dol_getcache($memoryid)
}
}
- $memoryid = session_name() . '_' . $memoryid;
+ $memoryid = session_name().'_'.$memoryid;
//$m->setOption(Memcached::OPT_COMPRESSION, false);
$data = $m->get($memoryid);
//print "memoryid=".$memoryid." - rescode=".$rescode." - data=".count($data)."\n