diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php
index f3fa2cd47c1..46ce0c78345 100644
--- a/htdocs/comm/action/class/api_agendaevents.class.php
+++ b/htdocs/comm/action/class/api_agendaevents.class.php
@@ -79,7 +79,7 @@ class AgendaEvents extends DolibarrApi
throw new RestException(404, 'Agenda Events not found');
}
- if (! DolibarrApiAccess::$user->rights->agenda->allactions->read && $this->actioncomm->ownerid != DolibarrApiAccess::$user->id) {
+ if (! DolibarrApiAccess::$user->rights->agenda->allactions->read && $this->actioncomm->userownerid != DolibarrApiAccess::$user->id) {
throw new RestException(401, "Insufficient rights to read event for owner id ".$request_data['userownerid'].' Your id is '.DolibarrApiAccess::$user->id);
}
diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php
index 3e8ea324fda..a4b1eb0e188 100644
--- a/htdocs/compta/facture/invoicetemplate_list.php
+++ b/htdocs/compta/facture/invoicetemplate_list.php
@@ -374,14 +374,14 @@ if ($resql)
{
// Payment term
print '
';
- print $form->select_conditions_paiements($search_payment_term, 'search_payment_term', -1, 1, 1, 'maxwidth100');
+ $form->select_conditions_paiements($search_payment_term, 'search_payment_term', -1, 1, 1, 'maxwidth100');
print " | ";
}
if (! empty($arrayfields['f.fk_mode_reglement']['checked']))
{
// Payment mode
print '';
- print $form->select_types_paiements($search_payment_mode, 'search_payment_mode', '', 0, 1, 1, 0, 1, 'maxwidth100');
+ $form->select_types_paiements($search_payment_mode, 'search_payment_mode', '', 0, 1, 1, 0, 1, 'maxwidth100');
print ' | ';
}
if (! empty($arrayfields['recurring']['checked']))
@@ -487,7 +487,7 @@ if ($resql)
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
if (! empty($arrayfields['status']['checked'])) print_liste_field_titre($arrayfields['status']['label'], $_SERVER['PHP_SELF'], "f.suspended,f.frequency", "", $param, 'align="center"', $sortfield, $sortorder);
- print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'nomaxwidthsearch ')."\n";
+ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'nomaxwidthsearch ');
print "\n";
if ($num > 0)
@@ -550,7 +550,7 @@ if ($resql)
if (! empty($arrayfields['f.fk_cond_reglement']['checked']))
{
print '';
- print $form->form_conditions_reglement('', $objp->fk_cond_reglement, 'none');
+ $form->form_conditions_reglement('', $objp->fk_cond_reglement, 'none');
print ' | '."\n";
if (! $i) $totalarray['nbfield']++;
}
@@ -558,7 +558,7 @@ if ($resql)
if (! empty($arrayfields['f.fk_mode_reglement']['checked']))
{
print '';
- print $form->form_modes_reglement('', $objp->fk_mode_reglement, 'none');
+ $form->form_modes_reglement('', $objp->fk_mode_reglement, 'none');
print ' | '."\n";
if (! $i) $totalarray['nbfield']++;
}
diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php
index c693aa89b4c..a9eb9d52433 100644
--- a/htdocs/compta/prelevement/class/bonprelevement.class.php
+++ b/htdocs/compta/prelevement/class/bonprelevement.class.php
@@ -1803,8 +1803,8 @@ class BonPrelevement extends CommonObject
* Write sender of request (me).
* Note: The tag PmtInf is opened here but closed into caller
*
- * @param string $configuration conf
- * @param int $ladate Date
+ * @param Conf $configuration conf
+ * @param int $ladate Date
* @param int $nombre 0 or 1
* @param float $total Total
* @param string $CrLf End of line character
@@ -1827,15 +1827,15 @@ class BonPrelevement extends CommonObject
if ($account->fetch($id) > 0)
{
$this->emetteur_code_banque = $account->code_banque;
- $this->emetteur_code_guichet = $account->code_guichet;
- $this->emetteur_numero_compte = $account->number;
+ $this->emetteur_code_guichet = $account->code_guichet;
+ $this->emetteur_numero_compte = $account->number;
$this->emetteur_number_key = $account->cle_rib;
- $this->emetteur_iban = $account->iban;
- $this->emetteur_bic = $account->bic;
+ $this->emetteur_iban = $account->iban;
+ $this->emetteur_bic = $account->bic;
- $this->emetteur_ics = $conf->global->PRELEVEMENT_ICS; // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456";
+ $this->emetteur_ics = $conf->global->PRELEVEMENT_ICS; // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456";
- $this->raison_sociale = $account->proprio;
+ $this->raison_sociale = $account->proprio;
}
// Récupération info demandeur
diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php
index 47732d3459c..25fe68fb8aa 100644
--- a/htdocs/contrat/class/contrat.class.php
+++ b/htdocs/contrat/class/contrat.class.php
@@ -1054,7 +1054,7 @@ class Contrat extends CommonObject
if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order
{
require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
- $exp = new Expedition($db);
+ $exp = new Expedition($this->db);
$exp->fetch($this->origin_id);
$exp->fetchObjectLinked();
if (count($exp->linkedObjectsIds['commande']) > 0)
diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php
index c8de3c80d2e..709832118c2 100644
--- a/htdocs/core/lib/usergroups.lib.php
+++ b/htdocs/core/lib/usergroups.lib.php
@@ -255,6 +255,7 @@ function user_admin_prepare_head()
$langs->load("users");
$h = 0;
+ $head = array();
$head[$h][0] = DOL_URL_ROOT.'/admin/user.php';
$head[$h][1] = $langs->trans("Parameters");
diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php
index 18132a5c4f5..87285bcefeb 100644
--- a/htdocs/expedition/class/expedition.class.php
+++ b/htdocs/expedition/class/expedition.class.php
@@ -1614,7 +1614,7 @@ class Expedition extends CommonObject
*/
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $notooltip = 0, $save_lastsearch_value = -1)
{
- global $langs;
+ global $langs, $conf;
$result = '';
$label = ''.$langs->trans("ShowSending").'';
diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php
index 0011ea3b7a7..e28f2e7324f 100644
--- a/htdocs/livraison/class/livraison.class.php
+++ b/htdocs/livraison/class/livraison.class.php
@@ -360,12 +360,13 @@ class Livraison extends CommonObject
}
/**
- * Validate object and update stock if option enabled
+ * Validate object and update stock if option enabled
*
- * @param User $user Object user that validate
- * @return int
+ * @param User $user Object user that validate
+ * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
+ * @return int
*/
- public function valid($user)
+ public function valid($user, $notrigger = 0)
{
global $conf, $langs;
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index 0ec6652f20b..6448dbbf622 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -49,6 +49,11 @@ class Project extends CommonObject
*/
public $table_element_line = 'projet_task';
+ /**
+ * @var int Name of field date
+ */
+ public $table_element_date;
+
/**
* @var int Field with ID of parent key if this field has a parent
*/
diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php
index 60664b99b19..23bc09a7268 100644
--- a/htdocs/takepos/invoice.php
+++ b/htdocs/takepos/invoice.php
@@ -226,7 +226,7 @@ if ($action == 'valid' && $user->rights->facture->creer)
if ($action == 'history')
{
- $placeid = GETPOST('placeid', 'int');
+ $placeid = (int) GETPOST('placeid', 'int');
$invoice = new Facture($db);
$invoice->fetch($placeid);
}