diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 18673422697..694e696d6ee 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -435,7 +435,8 @@ class Adherent extends CommonObject
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db);
$hookmanager->callHooks(array('memberdao'));
- $parameters=array('socid'=>$socid);
+ $parameters=array('id'=>$this->id);
+ $action='';
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (empty($reshook))
{
diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php
index 4a3d30f1bd2..6450eab568f 100644
--- a/htdocs/comm/propal/class/propal.class.php
+++ b/htdocs/comm/propal/class/propal.class.php
@@ -921,6 +921,7 @@ class Propal extends CommonObject
if (is_object($hookmanager))
{
$parameters=array('objFrom'=>$objFrom);
+ $action='';
$reshook=$hookmanager->executeHooks('createfrom',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) $error++;
}
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index 1c8214cd583..4734a881ed0 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -829,6 +829,7 @@ class Commande extends CommonObject
if (is_object($hookmanager))
{
$parameters=array('objFrom'=>$objFrom);
+ $action='';
$reshook=$hookmanager->executeHooks('createfrom',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) $error++;
}
@@ -924,6 +925,7 @@ class Commande extends CommonObject
$hookmanager->callHooks(array('orderdao'));
$parameters=array('objFrom'=>$object);
+ $action='';
$reshook=$hookmanager->executeHooks('createfrom',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) $error++;
@@ -1580,7 +1582,8 @@ class Commande extends CommonObject
$this->stocks = array();
// Tableau des id de produit de la commande
-
+ $array_of_product=array();
+
// Recherche total en stock pour chaque produit
if (count($array_of_product))
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index 6a7c2a2116b..899f5e49c04 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -570,6 +570,7 @@ class Facture extends CommonObject
if (is_object($hookmanager))
{
$parameters=array('objFrom'=>$objFrom);
+ $action='';
$reshook=$hookmanager->executeHooks('createfrom',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) $error++;
}
@@ -665,6 +666,7 @@ class Facture extends CommonObject
$hookmanager->callHooks(array('invoicedao'));
$parameters=array('objFrom'=>$object);
+ $action='';
$reshook=$hookmanager->executeHooks('createfrom',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) $error++;
diff --git a/htdocs/compta/prelevement/class/bon-prelevement.class.php b/htdocs/compta/prelevement/class/bon-prelevement.class.php
index 2f496754c29..8176aa153f9 100644
--- a/htdocs/compta/prelevement/class/bon-prelevement.class.php
+++ b/htdocs/compta/prelevement/class/bon-prelevement.class.php
@@ -715,15 +715,15 @@ class BonPrelevement extends CommonObject
* Create a withdraw
*
* @param int $banque code of bank
- * @param int $guichet code of banck office
+ * @param int $agence code of bank office (guichet)
* @param string $mode real=do action, simu=test only
* @return int <0 if KO, nbre of invoice withdrawed if OK
*/
- function Create($banque=0, $guichet=0, $mode='real')
+ function Create($banque=0, $agence=0, $mode='real')
{
global $conf,$langs;
- dol_syslog("BonPrelevement::Create banque=$banque guichet=$guichet");
+ dol_syslog("BonPrelevement::Create banque=$banque agence=$agence");
require_once (DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
require_once (DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index e23d5694880..476d683c68e 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -2127,6 +2127,7 @@ abstract class CommonObject
if (empty($line->fk_parent_line))
{
$parameters=array('line'=>$line,'var'=>$var,'i'=>$i);
+ $action='';
$reshook=$hookmanager->executeHooks('printOriginObjectLine',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
}
}
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 27289b06b2b..9087c5bbd48 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1810,7 +1810,7 @@ class Form
$tmparray[$obj->rowid]['label']=$label;
$i++;
}
- $this->cache_demand_reason=dol_sort_array($tmparray,'label', $order='asc', $natsort, $case_sensitive);
+ $this->cache_demand_reason=dol_sort_array($tmparray,'label', $order='asc');
unset($tmparray);
return 1;
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index 16059e6fbe3..17ed5593e2d 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -480,11 +480,12 @@ function show_projects($conf,$langs,$db,$object,$backtopage='')
/**
* Show html area for list of contacts
- * @param conf Object conf
- * @param langs Object langs
- * @param db Database handler
- * @param object Third party object
- * @param backtopage Url to go once contact is created
+ *
+ * @param Conf $conf Object conf
+ * @param Translate $langs Object langs
+ * @param DoliDB $db Database handler
+ * @param Object $object Third party object
+ * @param string $backtopage Url to go once contact is created
*/
function show_contacts($conf,$langs,$db,$object,$backtopage='')
{
@@ -743,6 +744,7 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
/**
* Show html area with actions done
+ *
* @param conf Object conf
* @param langs Object langs
* @param db Object db
@@ -837,6 +839,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
$numaction++;
$i++;
}
+ $db->free($resql);
}
else
{
@@ -967,8 +970,6 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
}
$out.="\n";
$out.="
\n";
-
- $db->free($result);
}
if ($noprint) return $out;
diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php
index 3db6fe164c8..7c94b19b66c 100644
--- a/htdocs/core/lib/pdf.lib.php
+++ b/htdocs/core/lib/pdf.lib.php
@@ -685,6 +685,7 @@ function pdf_writelinedesc(&$pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy,$hide
$special_code = $object->lines[$i]->special_code;
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
$parameters = array('pdf'=>$pdf,'i'=>$i,'outputlangs'=>$outputlangs,'w'=>$w,'h'=>$h,'posx'=>$posx,'posy'=>$posy,'hideref'=>$hideref,'hidedesc'=>$hidedesc,'issupplierline'=>$issupplierline,'special_code'=>$special_code);
+ $action='';
$reshook=$hookmanager->executeHooks('pdf_writelinedesc',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
}
else
@@ -929,6 +930,7 @@ function pdf_getlinevatrate($object,$i,$outputlangs,$hidedetails=0,$hookmanager=
$special_code = $object->lines[$i]->special_code;
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
+ $action='';
return $hookmanager->executeHooks('pdf_getlinevatrate',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
}
else
@@ -959,6 +961,7 @@ function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0,$hookmanage
$special_code = $object->lines[$i]->special_code;
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
+ $action='';
return $hookmanager->executeHooks('pdf_getlineupexcltax',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
}
else
@@ -985,6 +988,7 @@ function pdf_getlineqty($object,$i,$outputlangs,$hidedetails=0,$hookmanager=fals
$special_code = $object->lines[$i]->special_code;
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
+ $action='';
return $hookmanager->executeHooks('pdf_getlineqty',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
}
else
@@ -1013,6 +1017,7 @@ function pdf_getlineqty_asked($object,$i,$outputlangs,$hidedetails=0,$hookmanage
$special_code = $object->lines[$i]->special_code;
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
+ $action='';
return $hookmanager->executeHooks('pdf_getlineqty_asked',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
}
else
@@ -1041,6 +1046,7 @@ function pdf_getlineqty_shipped($object,$i,$outputlangs,$hidedetails=0,$hookmana
$special_code = $object->lines[$i]->special_code;
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
+ $action='';
return $hookmanager->executeHooks('pdf_getlineqty_shipped',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
}
else
@@ -1069,6 +1075,7 @@ function pdf_getlineqty_keeptoship($object,$i,$outputlangs,$hidedetails=0,$hookm
$special_code = $object->lines[$i]->special_code;
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
+ $action='';
return $hookmanager->executeHooks('pdf_getlineqty_keeptoship',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
}
else
@@ -1099,6 +1106,7 @@ function pdf_getlineremisepercent($object,$i,$outputlangs,$hidedetails=0,$hookma
$special_code = $object->lines[$i]->special_code;
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
+ $action='';
return $hookmanager->executeHooks('pdf_getlineremisepercent',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
}
else
@@ -1136,6 +1144,7 @@ function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0,$hookman
$special_code = $object->lines[$i]->special_code;
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
+ $action='';
return $hookmanager->executeHooks('pdf_getlinetotalexcltax',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
}
else
diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php
index ed5b6bfeed1..001c1ca6c18 100644
--- a/htdocs/core/lib/usergroups.lib.php
+++ b/htdocs/core/lib/usergroups.lib.php
@@ -142,9 +142,10 @@ function group_prepare_head($object)
/**
* Show list of themes. Show all thumbs of themes
- * @param fuser User concerned or '' for global theme
- * @param edit 1 to add edit form
- * @param foruserprofile Show for user profile view
+ *
+ * @param User $fuser User concerned or '' for global theme
+ * @param int $edit 1 to add edit form
+ * @param boolean $foruserprofile Show for user profile view
*/
function show_theme($fuser,$edit=0,$foruserprofile=false)
{
@@ -166,21 +167,21 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
// Title
if ($foruserprofile)
{
- print '