diff --git a/htdocs/api/class/api_login.class.php b/htdocs/api/class/api_login.class.php
index 2c182abbb6b..9d8b90a0123 100644
--- a/htdocs/api/class/api_login.class.php
+++ b/htdocs/api/class/api_login.class.php
@@ -62,11 +62,7 @@ class Login
// TODO Remove the API login. The token must be generated from backoffice only.
// Authentication mode
- if (empty($dolibarr_main_authentication))
- $dolibarr_main_authentication = 'http,dolibarr';
-
- // this is manage directly in the module with $context parameters
- //$dolibarr_main_authentication = preg_replace('/twofactor/', 'dolibarr', $dolibarr_main_authentication);
+ if (empty($dolibarr_main_authentication)) $dolibarr_main_authentication = 'dolibarr';
// Authentication mode: forceuser
if ($dolibarr_main_authentication == 'forceuser')
diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php
index f9231f4f247..d89eecfed1a 100644
--- a/htdocs/compta/bank/treso.php
+++ b/htdocs/compta/bank/treso.php
@@ -312,7 +312,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$reshook = $hookmanager->executeHooks('printObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if(empty($reshook)){
print $hookmanager->resPrint;
- $solde = isset($hookmanager->resArray['solde']) ? $hookmanager->resArray['solde'] : $solde;
+ $solde = isset($hookmanager->resArray['solde']) ? $hookmanager->resArray['solde'] : $solde;
}
// solde
diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php
index 920acd1c22f..30c31109224 100644
--- a/htdocs/compta/paiement.php
+++ b/htdocs/compta/paiement.php
@@ -744,6 +744,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
}
print "";
+ $parameters=array();
+ $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
+
// Warning
print '
';
//print "xx".$amounts[$invoice->id]."-".$amountsresttopay[$invoice->id]." ";
@@ -754,9 +757,6 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
}
print ' | ';
- $parameters=array();
- $reshook=$hookmanager->executeHooks('printObjectLine', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
-
print "\n";
$total+=$objp->total;
@@ -893,12 +893,13 @@ if (! GETPOST('action', 'aZ09'))
print ''.$objp->ref." | \n";
print ''.dol_print_date($db->jdate($objp->dp))." | \n";
print ''.$objp->paiement_type.' '.$objp->num_paiement." | \n";
- print ''.price($objp->amount).' | | ';
-
- $parameters=array();
- $reshook=$hookmanager->executeHooks('printObjectLine', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
-
+ print ''.price($objp->amount).' | ';
+ print ' | ';
print '';
+
+ $parameters=array();
+ $reshook=$hookmanager->executeHooks('printObjectLine', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
+
$i++;
}
print '';
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index 672ca225d53..2f6c474e632 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -172,7 +172,8 @@ function societe_prepare_head(Societe $object)
}
// Related items
- if (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->ficheinter->enabled) || ! empty($conf->fournisseur->enabled))
+ if ((! empty($conf->commande->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->ficheinter->enabled) || ! empty($conf->fournisseur->enabled))
+ && empty($conf->global->THIRPARTIES_DISABLE_RELATED_OBJECT_TAB))
{
$head[$h][0] = DOL_URL_ROOT.'/societe/consumption.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Referers");
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index f5f5a6954c3..f267e572ee4 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -1230,7 +1230,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
}
if ($popuptab) $outmore.='';
- if ($displaytab > $limittoshow)
+ if ($popuptab) // If there is some tabs not shown
{
$left=($langs->trans("DIRECTION") == 'rtl'?'right':'left');
$right=($langs->trans("DIRECTION") == 'rtl'?'left':'right');
diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php
index 627d9cb671a..8520ae74cf9 100644
--- a/htdocs/core/lib/security2.lib.php
+++ b/htdocs/core/lib/security2.lib.php
@@ -47,10 +47,10 @@ function dol_getwebuser($mode)
* @param string $passwordtotest Password value to test
* @param string $entitytotest Instance of data we must check
* @param array $authmode Array list of selected authentication mode array('http', 'dolibarr', 'xxx'...)
- * @param string $context Context checkLoginPassEntity was created for ('api', 'dav', ...)
+ * @param string $context Context checkLoginPassEntity was created for ('api', 'dav', '')
* @return string Login or ''
*/
-function checkLoginPassEntity($usertotest, $passwordtotest, $entitytotest, $authmode, $context = null)
+function checkLoginPassEntity($usertotest, $passwordtotest, $entitytotest, $authmode, $context = '')
{
global $conf,$langs;
//global $dolauthmode; // To return authentication finally used
diff --git a/htdocs/dav/fileserver.php b/htdocs/dav/fileserver.php
index 64329e72f1e..24460a1e2c6 100644
--- a/htdocs/dav/fileserver.php
+++ b/htdocs/dav/fileserver.php
@@ -106,9 +106,6 @@ $authBackend = new \Sabre\DAV\Auth\Backend\BasicCallBack(function ($username, $p
// Authentication mode
if (empty($dolibarr_main_authentication)) $dolibarr_main_authentication='dolibarr';
- // this is manage directly in the module with $context parameters
- //$dolibarr_main_authentication = preg_replace('/twofactor/', 'dolibarr', $dolibarr_main_authentication);
-
// Authentication mode: forceuser
if ($dolibarr_main_authentication == 'forceuser')
{
diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php
index 283d81f2713..587d494a51f 100644
--- a/htdocs/product/fournisseurs.php
+++ b/htdocs/product/fournisseurs.php
@@ -810,12 +810,16 @@ SCRIPT;
print_liste_field_titre("BarcodeType", $_SERVER["PHP_SELF"], "pfp.fk_barcode_type", "", $param, '', $sortfield, $sortorder, 'center ');
}
print_liste_field_titre("DateModification", $_SERVER["PHP_SELF"], "pfp.tms", "", $param, '', $sortfield, $sortorder, 'right ');
+ if (is_object($hookmanager))
+ {
+ $parameters=array('id_fourn'=>$id_fourn, 'prod_id'=>$object->id);
+ $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action);
+ }
print_liste_field_titre('');
print "\n";
if (is_array($product_fourn_list))
{
-
foreach($product_fourn_list as $productfourn)
{
print '';
@@ -923,7 +927,7 @@ SCRIPT;
if (is_object($hookmanager))
{
$parameters=array('id_pfp'=>$productfourn->product_fourn_price_id,'id_fourn'=>$id_fourn,'prod_id'=>$object->id);
- $reshook=$hookmanager->executeHooks('printObjectLine', $parameters, $object, $action);
+ $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action);
}
// Modify-Remove
diff --git a/htdocs/stripe/payment.php b/htdocs/stripe/payment.php
index be9f74b7bd7..6811df8d589 100644
--- a/htdocs/stripe/payment.php
+++ b/htdocs/stripe/payment.php
@@ -817,9 +817,11 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
if ($facture->type == 2) { $remaindertopay=$langs->trans("RemainderToPayBack"); $multicurrencyremaindertopay=$langs->trans("MulticurrencyRemainderToPayBack"); }
$i = 0;
- //print '
';
+
print ' ';
+
print_barre_liste($langs->trans('StripeInvoiceList').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', '');
+
print '';
print '';
print '| '.$arraytitle.' | ';
@@ -837,7 +839,12 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
if (!empty($conf->multicurrency->enabled)) {
print ''.$langs->trans('MulticurrencyPaymentAmount').' | ';
}
- print ' | ';
+
+ $tmpinvoice =new Facture($db);
+ $parameters=array();
+ $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $tmpinvoice, $action); // Note that $action and $object may have been modified by hook
+
+ print ' | ';
print " \n";
$total=0;
@@ -967,6 +974,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print "";
}
+ $parameters=array();
+ $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
+
// Warning
print '';
//print "xx".$amounts[$invoice->id]."-".$amountsresttopay[$invoice->id]." ";
@@ -977,9 +987,6 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
}
print ' | ';
- $parameters=array();
- $reshook=$hookmanager->executeHooks('printObjectLine', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
-
print "\n";
$total+=$objp->total;
@@ -991,7 +998,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
}
if ($i > 1)
{
- $amount=round(price($sign * price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits, 'MT'))*100);
+ $amount=round(price($sign * price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits, 'MT'))*100);
+
// Print total
print '';
print '| '.$langs->trans('TotalTTC').' | ';
@@ -1010,6 +1018,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
if (!empty($conf->multicurrency->enabled)) {
print ' | ';
}
+ print ' | ';
print " \n";
}
print " ";
@@ -1106,22 +1115,29 @@ if (! GETPOST('action'))
print_liste_field_titre('Date', $_SERVER["PHP_SELF"], 'dp', '', '', '', $sortfield, $sortorder);
print_liste_field_titre('Type', $_SERVER["PHP_SELF"], 'libelle', '', '', '', $sortfield, $sortorder);
print_liste_field_titre('Amount', $_SERVER["PHP_SELF"], 'fa_amount', '', '', '', $sortfield, $sortorder, 'right ');
+
+ $tmpobject = new Paiement($db);
+ $parameters=array();
+ $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $tmpobject, $action); // Note that $action and $object may have been modified by hook
+
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
- print " |
\n";
+ print "\n";
while ($i < min($num, $limit))
{
$objp = $db->fetch_object($resql);
+
print '';
print '| '.$objp->ref." | \n";
print ''.dol_print_date($db->jdate($objp->dp))." | \n";
print ''.$objp->paiement_type.' '.$objp->num_paiement." | \n";
- print ''.price($objp->amount).' | | ';
+ print ''.price($objp->amount).' | ';
$parameters=array();
- $reshook=$hookmanager->executeHooks('printObjectLine', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
+ $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
- print '
';
+ print ' | ';
+ print '';
$i++;
}
print '';