diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php
index d0a3c6ba271..f72682ce22a 100644
--- a/htdocs/adherents/card.php
+++ b/htdocs/adherents/card.php
@@ -1046,7 +1046,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Website
print '
| '.$form->editfieldkey('Web', 'member_url', GETPOST('member_url', 'alpha'), $object, 0).' | ';
- print ''.img_picto('', 'globe').' |
';
+ print ''.img_picto('', 'globe').' | ';
// Address
print '| '.$langs->trans("Address").' | ';
diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index b39576a8d44..e93b5a58e96 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -1075,7 +1075,7 @@ if ($mode == 'marketplace') {
- get_products(!empty($categorie) ? $categorie: ''); ?>
+ get_products(); ?>
diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php
index c5184a18454..6cf7d3051f3 100644
--- a/htdocs/contact/card.php
+++ b/htdocs/contact/card.php
@@ -362,7 +362,7 @@ if (empty($reshook)) {
if (!$error) {
$contactid = GETPOST("contactid", 'int');
$object->fetch($contactid);
- $object->fetchRoles($contactid);
+ $object->fetchRoles();
// Photo save
$dir = $conf->societe->multidir_output[$object->entity]."/contact/".$object->id."/photos";
diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php
index 052d5ae7e1c..9f5ea960c9a 100644
--- a/htdocs/core/class/discount.class.php
+++ b/htdocs/core/class/discount.class.php
@@ -419,7 +419,7 @@ class DiscountAbsolute
* When discount is from a credit note used to reduce payment of an invoice, we link using rowidinvoice
*
* @param int $rowidline Invoice line id (To use discount into invoice lines)
- * @param int $rowidinvoice Invoice id (To use discount as a credit note to reduc payment of invoice)
+ * @param int $rowidinvoice Invoice id (To use discount as a credit note to reduce payment of invoice)
* @return int <0 if KO, >0 if OK
*/
public function link_to_invoice($rowidline, $rowidinvoice)
diff --git a/htdocs/core/class/dolgeoip.class.php b/htdocs/core/class/dolgeoip.class.php
index 24726fec7c3..a2eea7023d9 100644
--- a/htdocs/core/class/dolgeoip.class.php
+++ b/htdocs/core/class/dolgeoip.class.php
@@ -45,7 +45,7 @@ class DolGeoIP
{
global $conf;
- $geoipversion = '2'; // 'php', or '2'
+ $geoipversion = '2'; // 'php', or geoip version '2'
if (!empty($conf->global->GEOIP_VERSION)) {
$geoipversion = $conf->global->GEOIP_VERSION;
}
@@ -181,7 +181,7 @@ class DolGeoIP
return '';
}
} else {
- return geoip_country_code_by_name($this->gi, $name);
+ return strtolower(geoip_country_code_by_name($name));
}
}
diff --git a/htdocs/core/class/fileupload.class.php b/htdocs/core/class/fileupload.class.php
index a3fb3505fba..906933c9701 100644
--- a/htdocs/core/class/fileupload.class.php
+++ b/htdocs/core/class/fileupload.class.php
@@ -180,6 +180,8 @@ class FileUpload
)
);
+ global $action;
+
$hookmanager->executeHooks(
'overrideUploadOptions',
array(
@@ -187,8 +189,7 @@ class FileUpload
'element' => $element
),
$object,
- $action,
- $hookmanager
+ $action
);
if ($options) {
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index fece6df98ec..bf75035f333 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -2061,7 +2061,7 @@ function get_left_menu_products($mainmenu, &$newmenu, $usemenuhider = 1, $leftme
if (isModEnabled('supplier_order')) {
$newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->hasRight('stock', 'mouvement', 'creer') && $user->hasRight('fournisseur', 'lire'));
}
- $newmenu->add("/product/stock/stockatdate.php", $langs->trans("StockAtDate"), 1, $user->hasRight('product', 'read', '', 1) && $user->hasRight('stock', 'lire'));
+ $newmenu->add("/product/stock/stockatdate.php", $langs->trans("StockAtDate"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire'));
// Categories for warehouses
if (isModEnabled('categorie')) {
diff --git a/htdocs/core/modules/oauth/google_oauthcallback.php b/htdocs/core/modules/oauth/google_oauthcallback.php
index 80c39d85158..ed0caa1a4ff 100644
--- a/htdocs/core/modules/oauth/google_oauthcallback.php
+++ b/htdocs/core/modules/oauth/google_oauthcallback.php
@@ -42,7 +42,7 @@ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domai
$action = GETPOST('action', 'aZ09');
$backtourl = GETPOST('backtourl', 'alpha');
$keyforprovider = GETPOST('keyforprovider', 'aZ09');
-if (!GETPOSTISSET('keyforprovider', 'aZ09') && !empty($_SESSION["oauthkeyforproviderbeforeoauthjump"]) && (GETPOST('code') || $action == 'delete')) {
+if (!GETPOSTISSET('keyforprovider') && !empty($_SESSION["oauthkeyforproviderbeforeoauthjump"]) && (GETPOST('code') || $action == 'delete')) {
// If we are coming from the Oauth page
$keyforprovider = $_SESSION["oauthkeyforproviderbeforeoauthjump"];
}
diff --git a/htdocs/core/tpl/advtarget.tpl.php b/htdocs/core/tpl/advtarget.tpl.php
index 8f27d747fab..55d5c5ed24a 100644
--- a/htdocs/core/tpl/advtarget.tpl.php
+++ b/htdocs/core/tpl/advtarget.tpl.php
@@ -198,7 +198,7 @@ if (!empty($array_query['cust_prospect_status'])) {
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
}
print ' | ';
-print $formadvtargetemaling->multiselectProspectionStatus($array_query['cust_prospect_status'], 'cust_prospect_status', 1);
+print $formadvtargetemaling->multiselectProspectionStatus($array_query['cust_prospect_status'], 'cust_prospect_status');
print ' | '."\n";
print ' |
'."\n";
diff --git a/htdocs/don/payment/card.php b/htdocs/don/payment/card.php
index 19f40bc984e..416e848d271 100644
--- a/htdocs/don/payment/card.php
+++ b/htdocs/don/payment/card.php
@@ -181,7 +181,7 @@ if ($resql) {
// Expected to pay
print ''.price($objp->d_amount).' | ';
// Status
- print ''.$don->getLibStatut(4, $objp->amount).' | ';
+ print ''.$don->getLibStatut(4).' | ';
// Amount paid
print ''.price($objp->amount).' | ';
print "\n";
diff --git a/htdocs/ecm/search.php b/htdocs/ecm/search.php
index e37a1ce88f3..c43428fae8e 100644
--- a/htdocs/ecm/search.php
+++ b/htdocs/ecm/search.php
@@ -175,7 +175,7 @@ print load_fiche_titre($langs->trans("ECMArea").' - '.$langs->trans("Search"));
print $langs->trans("FeatureNotYetAvailable").'.
';
// Tool bar
-$head = ecm_prepare_head_fm($ecmdir, $module, $section);
+$head = ecm_prepare_head_fm($ecmdir);
//print dol_get_fiche_head($head, 'search_form', '', 1);
diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php
index a14f5b75be9..75c5b02de10 100644
--- a/htdocs/expensereport/card.php
+++ b/htdocs/expensereport/card.php
@@ -295,7 +295,7 @@ if (empty($reshook)) {
}
if (!$error && empty($conf->global->EXPENSEREPORT_ALLOW_OVERLAPPING_PERIODS)) {
- $overlappingExpenseReportID = $object->periode_existe($fuser, $object->date_debut, $object->date_fin, true);
+ $overlappingExpenseReportID = $object->periode_existe($fuser, $object->date_debut, $object->date_fin);
if ($overlappingExpenseReportID > 0) {
$error++;
diff --git a/htdocs/expensereport/payment/card.php b/htdocs/expensereport/payment/card.php
index db6c21e202f..bdc7b51312a 100644
--- a/htdocs/expensereport/payment/card.php
+++ b/htdocs/expensereport/payment/card.php
@@ -209,7 +209,7 @@ if ($resql) {
print ''.price($objp->total_ttc - $objp->amount).' | ';
// Status
- print ''.$expensereport->getLibStatut(4, $objp->amount).' | ';
+ print ''.$expensereport->getLibStatut(4).' | ';
print "\n";
diff --git a/htdocs/fichinter/class/fichinterrec.class.php b/htdocs/fichinter/class/fichinterrec.class.php
index 2f4ca02d3c7..d1ab5fbee54 100644
--- a/htdocs/fichinter/class/fichinterrec.class.php
+++ b/htdocs/fichinter/class/fichinterrec.class.php
@@ -150,7 +150,7 @@ class FichinterRec extends Fichinter
$fichintsrc = new Fichinter($this->db);
$result = $fichintsrc->fetch($this->id_origin);
- $result = $fichintsrc->fetch_lines(1); // to get all lines
+ $result = $fichintsrc->fetch_lines(); // to get all lines
if ($result > 0) {
diff --git a/htdocs/fourn/ajax/getSupplierPrices.php b/htdocs/fourn/ajax/getSupplierPrices.php
index 29cf421059e..66001ccc5a6 100644
--- a/htdocs/fourn/ajax/getSupplierPrices.php
+++ b/htdocs/fourn/ajax/getSupplierPrices.php
@@ -88,7 +88,7 @@ if ($idprod > 0) {
$label .= ' ('.$productSupplier->fourn_ref.')';
}
- $prices[] = array("id" => $productSupplier->product_fourn_price_id, "price" => price2num($price, 0, '', 0), "label" => $label, "title" => $title); // For price field, we must use price2num(), for label or title, price()
+ $prices[] = array("id" => $productSupplier->product_fourn_price_id, "price" => price2num($price, '', 0), "label" => $label, "title" => $title); // For price field, we must use price2num(), for label or title, price()
}
}
diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php
index de012c86a58..ad5e9505cfd 100644
--- a/htdocs/fourn/class/fournisseur.facture.class.php
+++ b/htdocs/fourn/class/fournisseur.facture.class.php
@@ -1383,7 +1383,7 @@ class FactureFournisseur extends CommonInvoice
$result = $this->update_price(1);
if ($result > 0) {
// Create link between discount and invoice line
- $result = $remise->link_to_invoice($lineid, 0, 'supplier');
+ $result = $remise->link_to_invoice($lineid, 0);
if ($result < 0) {
$this->error = $remise->error;
$this->db->rollback();
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index ff9ada0a5c4..0720727f69c 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -1172,7 +1172,28 @@ if (empty($reshook)) {
if (!empty($conf->global->MAIN_DEPOSIT_MULTI_TVA) && $diff != 0) {
$object->fetch_lines();
$subprice_diff = $object->lines[0]->subprice - $diff / (1 + $object->lines[0]->tva_tx / 100);
- $object->updateline($object->lines[0]->id, $object->lines[0]->desc, $subprice_diff, $object->lines[0]->qty, $object->lines[0]->remise_percent, $object->lines[0]->date_start, $object->lines[0]->date_end, $object->lines[0]->tva_tx, 0, 0, 'HT', $object->lines[0]->info_bits, $object->lines[0]->product_type, 0, 0, 0, $object->lines[0]->pa_ht, $object->lines[0]->label, 0, array(), 100);
+ $object->updateline(
+ $object->lines[0]->id,
+ $object->lines[0]->desc,
+ $subprice_diff,
+ $object->lines[0]->tva_tx,
+ $object->lines[0]->localtax1_tx,
+ $object->lines[0]->localtax2_tx,
+ $object->lines[0]->qty,
+ $object->lines[0]->fk_product,
+ 'HT',
+ $object->lines[0]->info_bits,
+ $object->lines[0]->product_type,
+ $object->lines[0]->remise_percent,
+ 0,
+ $object->lines[0]->date_start,
+ $object->lines[0]->date_end,
+ 0,
+ 0,
+ 0,
+ '',
+ 100
+ );
}
} elseif ($result > 0) {
$lines = $srcobject->lines;
diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php
index 3bb84086b1e..f89cc60736d 100644
--- a/htdocs/margin/agentMargins.php
+++ b/htdocs/margin/agentMargins.php
@@ -109,7 +109,8 @@ $text = $langs->trans("Margins");
//print load_fiche_titre($text);
// Show tabs
-$head = marges_prepare_head($user);
+$head = marges_prepare_head();
+
$titre = $langs->trans("Margins");
$picto = 'margin';
diff --git a/htdocs/margin/checkMargins.php b/htdocs/margin/checkMargins.php
index 1349e02d2d8..0ef626c507f 100644
--- a/htdocs/margin/checkMargins.php
+++ b/htdocs/margin/checkMargins.php
@@ -176,7 +176,8 @@ if ($optioncss != '') {
}
// Show tabs
-$head = marges_prepare_head($user);
+$head = marges_prepare_head();
+
$picto = 'margin';
print '