From 6b1eef9827a72a9753bb151abd956fca3d8d0f6a Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 22 May 2020 00:50:13 +0200 Subject: [PATCH 1/9] Fix board exepense report to approve --- htdocs/index.php | 24 ++++++++++++------------ htdocs/theme/eldy/info-box.inc.php | 2 +- htdocs/theme/md/info-box.inc.php | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/htdocs/index.php b/htdocs/index.php index 250a0c1736b..44722403ef4 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -450,35 +450,35 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->socid && empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT)) { include_once DOL_DOCUMENT_ROOT . '/compta/paiement/cheque/class/remisecheque.class.php'; $board = new RemiseCheque($db); - $dashboardlines['RemiseCheque'] = $board->load_board($user); + $dashboardlines[$board->element] = $board->load_board($user); } // Number of foundation members if (!empty($conf->adherent->enabled) && $user->rights->adherent->lire && !$user->socid) { include_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php'; $board = new Adherent($db); - $dashboardlines['Adherent'] = $board->load_board($user); + $dashboardlines[$board->element] = $board->load_board($user); } // Number of expense reports to approve if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->approve) { include_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php'; $board = new ExpenseReport($db); - $dashboardlines['ExpenseReport'] = $board->load_board($user, 'toapprove'); + $dashboardlines[$board->element . '_toapprove'] = $board->load_board($user, 'toapprove'); } // Number of expense reports to pay if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->to_paid) { include_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php'; $board = new ExpenseReport($db); - $dashboardlines['ExpenseReport'] = $board->load_board($user, 'topay'); + $dashboardlines[$board->element . '_topay'] = $board->load_board($user, 'topay'); } // Number of holidays to approve if (!empty($conf->holiday->enabled) && $user->rights->holiday->approve) { include_once DOL_DOCUMENT_ROOT . '/holiday/class/holiday.class.php'; $board = new Holiday($db); - $dashboardlines['Holiday'] = $board->load_board($user); + $dashboardlines[$board->element] = $board->load_board($user); } $object = new stdClass(); @@ -556,28 +556,28 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { array( 'groupName' => 'BankAccount', 'stats' => - array('bank_account', 'RemiseCheque'), + array('bank_account', 'chequereceipt'), ), - 'Adherent' => + 'member' => array( 'groupName' => 'Members', 'globalStatsKey' => 'members', 'stats' => - array('Adherent'), + array('member'), ), - 'ExpenseReport' => + 'expensereport' => array( 'groupName' => 'ExpenseReport', 'globalStatsKey' => 'expensereports', 'stats' => - array('ExpenseReport'), + array('expensereport_toapprove', 'expensereport_topay'), ), - 'Holiday' => + 'holiday' => array( 'groupName' => 'Holidays', 'globalStatsKey' => 'holidays', 'stats' => - array('Holiday'), + array('holiday'), ), ); diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index 268f1885327..9c2ebd9e8a4 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -226,7 +226,7 @@ if (GETPOSTISSET('THEME_AGRESSIVENESS_RATIO')) $conf->global->THEME_AGRESSIVENES .fa-dol-bank_account:before { content: "\f19c"; } -.fa-dol-adherent:before { +.fa-dol-member:before { content: "\f0c0"; } .fa-dol-expensereport:before { diff --git a/htdocs/theme/md/info-box.inc.php b/htdocs/theme/md/info-box.inc.php index fb011e63e69..38315a76272 100644 --- a/htdocs/theme/md/info-box.inc.php +++ b/htdocs/theme/md/info-box.inc.php @@ -164,7 +164,7 @@ if (GETPOSTISSET('THEME_AGRESSIVENESS_RATIO')) $conf->global->THEME_AGRESSIVENES .fa-dol-bank_account:before { content: "\f19c"; } -.fa-dol-adherent:before { +.fa-dol-member:before { content: "\f0c0"; } .fa-dol-expensereport:before { From 875230ed13984fc41e12f045c3388f3d237fe475 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Sat, 23 May 2020 10:23:26 +0200 Subject: [PATCH 2/9] Fix missing batch update to varchar(128) --- htdocs/install/mysql/migration/11.0.0-12.0.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql index e2112b020b0..96506120263 100644 --- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql +++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql @@ -252,6 +252,7 @@ ALTER TABLE llx_blockedlog ADD COLUMN object_version varchar(32) DEFAULT ''; ALTER TABLE llx_product_lot MODIFY COLUMN batch varchar(128); ALTER TABLE llx_product_batch MODIFY COLUMN batch varchar(128); +ALTER TABLE llx_expeditiondet_batch MODIFY COLUMN batch varchar(128); ALTER TABLE llx_commande_fournisseur_dispatch MODIFY COLUMN batch varchar(128); ALTER TABLE llx_stock_mouvement MODIFY COLUMN batch varchar(128); ALTER TABLE llx_mrp_production MODIFY COLUMN batch varchar(128); From 3a15688f17646926f7362b66df725ee43d8a2de8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 May 2020 13:53:47 +0200 Subject: [PATCH 3/9] FIX #13951 --- .../class/ProductCombination.class.php | 164 +++++++++--------- 1 file changed, 85 insertions(+), 79 deletions(-) diff --git a/htdocs/variants/class/ProductCombination.class.php b/htdocs/variants/class/ProductCombination.class.php index 128c1974c77..b67f56db935 100644 --- a/htdocs/variants/class/ProductCombination.class.php +++ b/htdocs/variants/class/ProductCombination.class.php @@ -71,12 +71,12 @@ class ProductCombination */ public $entity; - /** - * Constructor - * - * @param DoliDB $db Database handler - */ - public function __construct(DoliDB $db) + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct(DoliDB $db) { global $conf; @@ -189,16 +189,16 @@ class ProductCombination */ public function countNbOfCombinationForFkProductParent($fk_product_parent) { - $nb = 0; - $sql = "SELECT count(rowid) as nb FROM ".MAIN_DB_PREFIX."product_attribute_combination WHERE fk_product_parent = ".(int) $fk_product_parent." AND entity IN (".getEntity('product').")"; + $nb = 0; + $sql = "SELECT count(rowid) as nb FROM ".MAIN_DB_PREFIX."product_attribute_combination WHERE fk_product_parent = ".(int) $fk_product_parent." AND entity IN (".getEntity('product').")"; - $resql = $this->db->query($sql); - if ($resql) { - $obj = $this->db->fetch_object($resql); - if ($obj) $nb = $obj->nb; - } + $resql = $this->db->query($sql); + if ($resql) { + $obj = $this->db->fetch_object($resql); + if ($obj) $nb = $obj->nb; + } - return $nb; + return $nb; } /** @@ -326,14 +326,20 @@ class ProductCombination $child = new Product($this->db); $child->fetch($this->fk_product_child); + $child->price_autogen = $parent->price_autogen; $child->weight = $parent->weight; if ($this->variation_weight) { // If we must add a delta on weight $child->weight = ($child->weight ? $child->weight : 0) + $this->variation_weight; } - $child->weight_units = $parent->weight_units; - $varlabel = $this->getCombinationLabel($this->fk_product_child); - $child->label = $parent->label.$varlabel; + $child->weight_units = $parent->weight_units; + + // Don't update the child label if the user has already modified it. + if ($child->label == $parent->label) { + // This will trigger only at variant creation time + $varlabel = $this->getCombinationLabel($this->fk_product_child); + $child->label = $parent->label.$varlabel;; + } if ($child->update($child->id, $user) > 0) { $new_vat = $parent->tva_tx; @@ -530,9 +536,9 @@ WHERE c.fk_product_parent = ".(int) $productid." AND p.tosell = 1"; $newproduct->ref = $forced_refvar; } } else { - $forced_refvar = false; - $existingProduct = false; - $newproduct = clone $product; + $forced_refvar = false; + $existingProduct = false; + $newproduct = clone $product; } //Final weight impact @@ -593,11 +599,11 @@ WHERE c.fk_product_parent = ".(int) $productid." AND p.tosell = 1"; } if ($forced_refvar === false) { - if (isset($conf->global->PRODUIT_ATTRIBUTES_SEPARATOR)) { + if (isset($conf->global->PRODUIT_ATTRIBUTES_SEPARATOR)) { $newproduct->ref .= $conf->global->PRODUIT_ATTRIBUTES_SEPARATOR.$prodattrval->ref; - } else { + } else { $newproduct->ref .= '_'.$prodattrval->ref; - } + } } //The first one should not contain a linebreak @@ -616,62 +622,62 @@ WHERE c.fk_product_parent = ".(int) $productid." AND p.tosell = 1"; // Now create the product //print 'Create prod '.$newproduct->ref.'
'."\n"; if ($existingProduct === false) { - //To avoid wrong information in price history log - $newproduct->price = 0; - $newproduct->price_ttc = 0; - $newproduct->price_min = 0; - $newproduct->price_min_ttc = 0; + //To avoid wrong information in price history log + $newproduct->price = 0; + $newproduct->price_ttc = 0; + $newproduct->price_min = 0; + $newproduct->price_min_ttc = 0; - // A new variant must use a new barcode (not same product) - $newproduct->barcode = -1; - $result = $newproduct->create($user); + // A new variant must use a new barcode (not same product) + $newproduct->barcode = -1; + $result = $newproduct->create($user); - if ($result < 0) - { - //In case the error is not related with an already existing product - if ($newproduct->error != 'ErrorProductAlreadyExists') { - $this->error[] = $newproduct->error; - $this->errors = $newproduct->errors; - $db->rollback(); - return -1; - } + if ($result < 0) + { + //In case the error is not related with an already existing product + if ($newproduct->error != 'ErrorProductAlreadyExists') { + $this->error[] = $newproduct->error; + $this->errors = $newproduct->errors; + $db->rollback(); + return -1; + } - /** - * If there is an existing combination, then we update the prices and weight - * Otherwise, we try adding a random number to the ref - */ + /** + * If there is an existing combination, then we update the prices and weight + * Otherwise, we try adding a random number to the ref + */ - if ($newcomb->fk_product_child) { - $res = $newproduct->fetch($existingCombination->fk_product_child); - } else { - $orig_prod_ref = $newproduct->ref; - $i = 1; + if ($newcomb->fk_product_child) { + $res = $newproduct->fetch($existingCombination->fk_product_child); + } else { + $orig_prod_ref = $newproduct->ref; + $i = 1; - do { - $newproduct->ref = $orig_prod_ref.$i; - $res = $newproduct->create($user); + do { + $newproduct->ref = $orig_prod_ref.$i; + $res = $newproduct->create($user); - if ($newproduct->error != 'ErrorProductAlreadyExists') { - $this->errors[] = $newproduct->error; - break; - } + if ($newproduct->error != 'ErrorProductAlreadyExists') { + $this->errors[] = $newproduct->error; + break; + } - $i++; - } while ($res < 0); - } + $i++; + } while ($res < 0); + } - if ($res < 0) { - $db->rollback(); - return -1; - } - } + if ($res < 0) { + $db->rollback(); + return -1; + } + } } else { - $result = $newproduct->update($newproduct->id, $user); - if ($result < 0) - { - $db->rollback(); - return -1; - } + $result = $newproduct->update($newproduct->id, $user); + if ($result < 0) + { + $db->rollback(); + return -1; + } } $newcomb->fk_product_child = $newproduct->id; @@ -686,14 +692,14 @@ WHERE c.fk_product_parent = ".(int) $productid." AND p.tosell = 1"; return $newproduct->id; } - /** - * Copies all product combinations from the origin product to the destination product - * + /** + * Copies all product combinations from the origin product to the destination product + * * @param User $user Object user - * @param int $origProductId Origin product id - * @param Product $destProduct Destination product - * @return int >0 OK <0 KO - */ + * @param int $origProductId Origin product id + * @param Product $destProduct Destination product + * @return int >0 OK <0 KO + */ public function copyAll(User $user, $origProductId, Product $destProduct) { require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination2ValuePair.class.php'; @@ -715,7 +721,7 @@ WHERE c.fk_product_parent = ".(int) $productid." AND p.tosell = 1"; $variations[$tmp_pc2v->fk_prod_attr] = $tmp_pc2v->fk_prod_attr_val; } - if ($this->createProductCombination( + if ($this->createProductCombination( $user, $destProduct, $variations, @@ -723,7 +729,7 @@ WHERE c.fk_product_parent = ".(int) $productid." AND p.tosell = 1"; $combination->variation_price_percentage, $combination->variation_price, $combination->variation_weight - ) < 0) + ) < 0) { return -1; } From 3a93dcf2c4cf340e023cf47570a3ea92a5a3a3d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 20 May 2020 20:19:00 +0200 Subject: [PATCH 4/9] Update paymentloan.class.php same picto in loan --- htdocs/loan/class/paymentloan.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index ce152317710..0aa5b2dbf62 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2015-2018 Frederic France + * Copyright (C) 2015-2020 Frederic France * * 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 @@ -40,6 +40,11 @@ class PaymentLoan extends CommonObject */ public $table_element = 'payment_loan'; + /** + * @var string String with name of icon for PaymentLoan + */ + public $picto = 'money-bill-alt'; + /** * @var int Loan ID */ From 8b4dcbaa64b74425169208cf4d9b73318cacd688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 20 May 2020 20:13:42 +0200 Subject: [PATCH 5/9] Update datapolicycron.class.php --- htdocs/datapolicy/class/datapolicycron.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/datapolicy/class/datapolicycron.class.php b/htdocs/datapolicy/class/datapolicycron.class.php index 409df1362e9..8e3cfe10874 100644 --- a/htdocs/datapolicy/class/datapolicycron.class.php +++ b/htdocs/datapolicy/class/datapolicycron.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2020 Frédéric France * * 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 @@ -482,7 +482,7 @@ class DataPolicyCron while ($i < $num && !$error) { - $obj = $db->fetch_object($resql); + $obj = $this->db->fetch_object($resql); $object->fetch($obj->rowid); $object->id = $obj->rowid; From 58e32aa2ff9379c2706d825b1a110e2cb41edec6 Mon Sep 17 00:00:00 2001 From: Tobias Sekan Date: Thu, 21 May 2020 09:31:06 +0200 Subject: [PATCH 6/9] Fix not wokring default values for date (re...) --- htdocs/compta/facture/card.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index ab2262844bf..522d4471daa 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1025,7 +1025,7 @@ if (empty($reshook)) // Replacement invoice if ($_POST['type'] == Facture::TYPE_REPLACEMENT) { - $dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $dateinvoice = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); if (empty($dateinvoice)) { $error++; @@ -1086,7 +1086,7 @@ if (empty($reshook)) $action = 'create'; } - $dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $dateinvoice = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); if (empty($dateinvoice)) { $error++; @@ -1269,7 +1269,7 @@ if (empty($reshook)) // Standard invoice or Deposit invoice, created from a Predefined template invoice if (($_POST['type'] == Facture::TYPE_STANDARD || $_POST['type'] == Facture::TYPE_DEPOSIT) && GETPOST('fac_rec', 'int') > 0) { - $dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $dateinvoice = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); if (empty($dateinvoice)) { $error++; @@ -1320,7 +1320,7 @@ if (empty($reshook)) $action = 'create'; } - $dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $dateinvoice = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); if (empty($dateinvoice)) { $error++; @@ -1745,7 +1745,7 @@ if (empty($reshook)) // Situation invoices if (GETPOST('type') == Facture::TYPE_SITUATION && (!empty($_POST['situations']))) { - $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $datefacture = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); if (empty($datefacture)) { $error++; $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")); From babcdfc99a7e3a52c332578ced8e1dbe31e46f9e Mon Sep 17 00:00:00 2001 From: Tobias Sekan Date: Thu, 21 May 2020 09:34:20 +0200 Subject: [PATCH 7/9] Fix not working default value (re...) --- htdocs/fourn/facture/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 6e8f259bc01..91d1b333e56 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -644,7 +644,7 @@ if (empty($reshook)) $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; - $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $datefacture = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); $datedue = dol_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear']); // Replacement invoice @@ -1758,7 +1758,7 @@ if ($action == 'create') if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) $currency_tx = $objectsrc->multicurrency_tx; } - $datetmp = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $datetmp = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); $dateinvoice = ($datetmp == '' ? (empty($conf->global->MAIN_AUTOFILL_DATE) ?-1 : '') : $datetmp); $datetmp = dol_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear']); $datedue = ($datetmp == '' ?-1 : $datetmp); @@ -1772,7 +1772,7 @@ if ($action == 'create') $cond_reglement_id = $societe->cond_reglement_supplier_id; $mode_reglement_id = $societe->mode_reglement_supplier_id; $fk_account = $societe->fk_account; - $datetmp = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $datetmp = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); $dateinvoice = ($datetmp == '' ? (empty($conf->global->MAIN_AUTOFILL_DATE) ?-1 : '') : $datetmp); $datetmp = dol_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear']); $datedue = ($datetmp == '' ?-1 : $datetmp); From 5f3a82423f5200274836b2a04b96f8f42bf61403 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 May 2020 14:38:37 +0200 Subject: [PATCH 8/9] Fix regression in look and feel v12 --- htdocs/theme/eldy/info-box.inc.php | 2 +- htdocs/theme/md/info-box.inc.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index e0ae5b045f6..2b734f037b3 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -235,7 +235,7 @@ if (GETPOSTISSET('THEME_AGRESSIVENESS_RATIO')) $conf->global->THEME_AGRESSIVENES .bg-infobox-bank_account{ color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } -.bg-infobox-adherent{ +.bg-infobox-adherent, .bg-infobox-member { color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } .bg-infobox-expensereport{ diff --git a/htdocs/theme/md/info-box.inc.php b/htdocs/theme/md/info-box.inc.php index 3c4323f9f97..f2a2a8b810d 100644 --- a/htdocs/theme/md/info-box.inc.php +++ b/htdocs/theme/md/info-box.inc.php @@ -34,7 +34,7 @@ if (!empty($conf->global->THEME_INFOBOX_COLOR_ON_BACKGROUND)) $prefix = 'backgro .bg-infobox-bank_account{ color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } -.bg-infobox-adherent{ +.bg-infobox-adherent, .bg-infobox-member{ color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } .bg-infobox-expensereport{ @@ -258,7 +258,7 @@ if (GETPOSTISSET('THEME_AGRESSIVENESS_RATIO')) $conf->global->THEME_AGRESSIVENES .bg-infobox-bank_account i.fa{ color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } -.bg-infobox-adherent i.fa{ +.bg-infobox-adherent i.fa, .bg-infobox-member i.fa{ color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } .bg-infobox-expensereport i.fa{ From 7c92bb218e31a531dd66c7255d1e0f15539b88e4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 May 2020 15:33:04 +0200 Subject: [PATCH 9/9] Fix no hreflang if not a canonical page --- htdocs/core/lib/website2.lib.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/core/lib/website2.lib.php b/htdocs/core/lib/website2.lib.php index 776c535d586..cdad3fcced6 100644 --- a/htdocs/core/lib/website2.lib.php +++ b/htdocs/core/lib/website2.lib.php @@ -157,9 +157,14 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage) $tplcontent .= ''."\n"; $tplcontent .= ''."\n"; $tplcontent .= ''."\n"; + // Add canonical reference + if ($object->virtualhost) { + $tplcontent .= ''."\n"; + } // Add translation reference (main language) if ($object->isMultiLang()) { // Add myself + $tplcontent .= 'pageurl.'.php") { ?>'."\n"; $tplcontent .= ''."\n"; // Add page "translation of" @@ -194,10 +199,7 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage) } } else dol_print_error($db); - } - // Add canonical reference - if ($object->virtualhost) { - $tplcontent .= ''."\n"; + $tplcontent .= ''."\n"; } // Add manifest.json on homepage $tplcontent .= 'use_manifest) { print \'\'."\n"; } ?>'."\n";