diff --git a/htdocs/core/class/antivir.class.php b/htdocs/core/class/antivir.class.php index e90c208d32e..7fa522d2037 100644 --- a/htdocs/core/class/antivir.class.php +++ b/htdocs/core/class/antivir.class.php @@ -51,8 +51,8 @@ class AntiVir * Scan a file with antivirus. * This function runs the command defined in setup. This antivirus command must return 0 if OK. * - * @param file File to scan - * @return int <0 if KO (-98 if error, -99 if virus), 0 if OK + * @param string $file File to scan + * @return int <0 if KO (-98 if error, -99 if virus), 0 if OK */ function dol_avscan_file($file) { @@ -126,9 +126,10 @@ class AntiVir /** - * \brief get full Command Line to run - * \param file File to scan - * \return string Full command line to run + * Get full Command Line to run + * + * @param string $file File to scan + * @return string Full command line to run */ function getCliCommand($file) { diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php index 6caf410ee85..aff50c4de67 100644 --- a/htdocs/core/class/canvas.class.php +++ b/htdocs/core/class/canvas.class.php @@ -24,8 +24,7 @@ /** - * \class Canvas - * \brief Class to manage canvas + * Class to manage canvas */ class Canvas { @@ -126,6 +125,7 @@ class Canvas /** * Return the template to display canvas (if it exists) * + * @param string $action Action code * @return int 0=Canvas template file does not exist, 1=Canvas template file exists */ function displayCanvasExists($action) @@ -140,7 +140,8 @@ class Canvas * Display a canvas page. This will include the template for output. * Variables used by templates may have been defined or loaded before into the assign_values function. * - * @return void + * @param string $action Action code + * @return void */ function display_canvas($action) { diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index 55209c975a5..577d314d186 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -22,10 +22,9 @@ */ /** - * \class DolEditor - * \brief Class to manage a WYSIWYG editor. - * Usage: $doleditor=new DolEditor('body',$message,320,'toolbar_mailing'); - * $doleditor->Create(); + * Class to manage a WYSIWYG editor. + * Usage: $doleditor=new DolEditor('body',$message,320,'toolbar_mailing'); + * $doleditor->Create(); */ class DolEditor { @@ -136,11 +135,11 @@ class DolEditor } /** - * Output edit area inside the HTML stream. - * Output depends on this->tool (fckeditor, ckeditor, texatrea, ...) + * Output edit area inside the HTML stream. + * Output depends on this->tool (fckeditor, ckeditor, texatrea, ...) * - * @param int $noprint 1=Return HTML string instead of printing it to output - * @return void + * @param int $noprint 1=Return HTML string instead of printing it to output + * @return void */ function Create($noprint=0) { diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 8381f4361d7..91b9e8ec78b 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -38,8 +38,7 @@ /** - * \class DolGraph - * \brief Parent class of graph classes + * Parent class of graph classes */ class DolGraph { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index be9044be70b..98d370eed8e 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -456,7 +456,7 @@ class Form $sql.= " WHERE active = 1"; $sql.= " ORDER BY code ASC"; - dol_syslog("Form::select_country sql=".$sql); + dol_syslog(get_class($this)."::select_country sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -716,13 +716,14 @@ class Form /** * Return HTML combo list of absolute discounts * - * @param selected Id remise fixe pre-selectionnee - * @param htmlname Nom champ formulaire - * @param filter Criteres optionnels de filtre - * @param maxvalue Max value for lines that can be selected - * @return int Return number of qualifed lines in list + * @param string $selected Id remise fixe pre-selectionnee + * @param string $htmlname Nom champ formulaire + * @param string $filter Criteres optionnels de filtre + * @param int $socid Id of thirdparty + * @param int $maxvalue Max value for lines that can be selected + * @return int Return number of qualifed lines in list */ - function select_remises($selected='',$htmlname='remise_id',$filter='',$socid, $maxvalue=0) + function select_remises($selected, $htmlname, $filter, $socid, $maxvalue=0) { global $langs,$conf; @@ -734,7 +735,7 @@ class Form if ($filter) $sql.= " AND ".$filter; $sql.= " ORDER BY re.description ASC"; - dol_syslog("Form::select_remises sql=".$sql); + dol_syslog(get_class(this)."::select_remises sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -782,15 +783,15 @@ class Form /** * Return list of all contacts (for a third party or all) * - * @param socid Id ot third party or 0 for all - * @param selected Id contact pre-selectionne - * @param htmlname Name of HTML field ('none' for a not editable field) - * @param show_empty 0=no empty value, 1=add an empty value - * @param exclude List of contacts id to exclude - * @param limitto Disable answers that are not id in this array list - * @param showfunction Add function into label - * @param moreclass Add more class to class style - * @return int <0 if KO, Nb of contact in list if OK + * @param int $socid Id ot third party or 0 for all + * @param string $selected Id contact pre-selectionne + * @param string $htmlname Name of HTML field ('none' for a not editable field) + * @param int $show_empty 0=no empty value, 1=add an empty value + * @param string $exclude List of contacts id to exclude + * @param string $limitto Disable answers that are not id in this array list + * @param string $showfunction Add function into label + * @param string $moreclass Add more class to class style + * @return int <0 if KO, Nb of contact in list if OK */ function select_contacts($socid,$selected='',$htmlname='contactid',$showempty=0,$exclude='',$limitto='',$showfunction=0, $moreclass='') { @@ -879,14 +880,15 @@ class Form /** * Return select list of users * - * @param selected Id user preselected - * @param htmlname Field name in form - * @param show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue - * @param exclude Array list of users id to exclude - * @param disabled If select list must be disabled - * @param include Array list of users id to include - * @param enableonly Array list of users id to be enabled. All other must be disabled - * @param force_entity Possibility to force entity + * @param string $selected Id user preselected + * @param string $htmlname Field name in form + * @param int $show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue + * @param array $exclude Array list of users id to exclude + * @param int $disabled If select list must be disabled + * @param array $include Array list of users id to include + * @param int $enableonly Array list of users id to be enabled. All other must be disabled + * @param int $force_entity Possibility to force entity + * @return void */ function select_users($selected='',$htmlname='userid',$show_empty=0,$exclude='',$disabled=0,$include='',$enableonly='',$force_entity=0) { @@ -896,14 +898,15 @@ class Form /** * Return select list of users * - * @param selected User id or user object of user preselected. If -1, we use id of current user. - * @param htmlname Field name in form - * @param show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue - * @param exclude Array list of users id to exclude - * @param disabled If select list must be disabled - * @param include Array list of users id to include - * @param enableonly Array list of users id to be enabled. All other must be disabled - * @param force_entity Possibility to force entity + * @param string $selected User id or user object of user preselected. If -1, we use id of current user. + * @param string $htmlname Field name in form + * @param int $show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue + * @param array $exclude Array list of users id to exclude + * @param int $disabled If select list must be disabled + * @param array $include Array list of users id to include + * @param int $enableonly Array list of users id to be enabled. All other must be disabled + * @param int $force_entity Possibility to force entity + * @return string HTML select string */ function select_dolusers($selected='',$htmlname='userid',$show_empty=0,$exclude='',$disabled=0,$include='',$enableonly='',$force_entity=0) { @@ -940,7 +943,7 @@ class Form if (is_array($include) && $includeUsers) $sql.= " AND u.rowid IN ('".$includeUsers."')"; $sql.= " ORDER BY u.name ASC"; - dol_syslog("Form::select_dolusers sql=".$sql); + dol_syslog(get_class($this)."::select_dolusers sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -1116,7 +1119,7 @@ class Form $outselect=''; $outjson=array(); - dol_syslog("Form::select_produits_do search product sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::select_produits_do search product sql=".$sql, LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -1177,7 +1180,7 @@ class Form $sql.= " ORDER BY date_price"; $sql.= " DESC LIMIT 1"; - dol_syslog("Form::select_produits_do search price for level '.$price_level.' sql=".$sql); + dol_syslog(get_class($this)."::select_produits_do search price for level '.$price_level.' sql=".$sql); $result2 = $this->db->query($sql); if ($result2) { @@ -1265,7 +1268,7 @@ class Form } /** - * Return list of products for customer in Ajax if Ajax activated or go to select_produits_fournisseurs_do + * Return list of products for customer (in Ajax if Ajax activated or go to select_produits_fournisseurs_do) * * @param int $socid Id third party * @param string $selected Preselected product @@ -1293,7 +1296,7 @@ class Form } /** - * Retourne la liste des produits de fournisseurs + * Return list of suppliers products * * @param socid Id societe fournisseur (0 pour aucun filtre) * @param selected Produit pre-selectionne @@ -1465,7 +1468,7 @@ class Form $sql.= " AND p.rowid = ".$productid; $sql.= " ORDER BY s.nom, pfp.ref_fourn DESC"; - dol_syslog("Form::select_product_fourn_price sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::select_product_fourn_price sql=".$sql,LOG_DEBUG); $result=$this->db->query($sql); if ($result) @@ -1546,7 +1549,7 @@ class Form $sql .= " WHERE a.fk_soc = ".$socid; $sql .= " ORDER BY a.label ASC"; - dol_syslog("Form::select_address sql=".$sql); + dol_syslog(get_class($this)."::select_address sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -1596,7 +1599,7 @@ class Form $sql.= " FROM ".MAIN_DB_PREFIX.'c_payment_term'; $sql.= " WHERE active=1"; $sql.= " ORDER BY sortorder"; - dol_syslog('Form::load_cache_conditions_paiements sql='.$sql,LOG_DEBUG); + dol_syslog(get_class($this).'::load_cache_conditions_paiements sql='.$sql,LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1635,7 +1638,7 @@ class Form $sql.= " FROM ".MAIN_DB_PREFIX.'c_availability'; $sql.= " WHERE active=1"; $sql.= " ORDER BY rowid"; - dol_syslog('Form::load_cache_availability sql='.$sql,LOG_DEBUG); + dol_syslog(get_class($this).'::load_cache_availability sql='.$sql,LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1662,10 +1665,11 @@ class Form /** * Retourne la liste des types de delais de livraison possibles * - * @param selected Id du type de delais pre-selectionne - * @param htmlname Nom de la zone select - * @param filtertype To add a filter - * @param addempty Add empty entry + * @param int $selected Id du type de delais pre-selectionne + * @param string $htmlname Nom de la zone select + * @param string $filtertype To add a filter + * @param int $addempty Add empty entry + * @return void */ function select_availability($selected='',$htmlname='availid',$filtertype='',$addempty=0) { @@ -1707,7 +1711,7 @@ class Form $sql.= " FROM ".MAIN_DB_PREFIX.'c_input_reason'; $sql.= " WHERE active=1"; $sql.= " ORDER BY rowid"; - dol_syslog('Form::load_cache_demand_reason sql='.$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::load_cache_demand_reason sql=".$sql,LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1739,10 +1743,11 @@ class Form /** * Return list of events that triggered an object creation * - * @param selected Id du type d'origine pre-selectionne - * @param htmlname Nom de la zone select - * @param exclude To exclude a code value (Example: SRC_PROP) - * @param addempty Add an empty entry + * @param int $selected Id du type d'origine pre-selectionne + * @param string $htmlname Nom de la zone select + * @param string $exclude To exclude a code value (Example: SRC_PROP) + * @param int $addempty Add an empty entry + * @return void */ function select_demand_reason($selected='',$htmlname='demandreasonid',$exclude='',$addempty=0) { @@ -1786,7 +1791,7 @@ class Form $sql.= " FROM ".MAIN_DB_PREFIX."c_paiement"; $sql.= " WHERE active > 0"; $sql.= " ORDER BY id"; - dol_syslog('Form::load_cache_types_paiements sql='.$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::load_cache_types_paiements sql=".$sql,LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1816,10 +1821,11 @@ class Form /** * Retourne la liste des types de paiements possibles * - * @param selected Id du type de paiement pre-selectionne - * @param htmlname Nom de la zone select - * @param filtertype Pour filtre - * @param addempty Ajoute entree vide + * @param string $selected Id du type de paiement pre-selectionne + * @param string $htmlname Nom de la zone select + * @param string $filtertype Pour filtre + * @param int $addempty Ajoute entree vide + * @return void */ function select_conditions_paiements($selected='',$htmlname='condid',$filtertype=-1,$addempty=0) { @@ -1850,19 +1856,20 @@ class Form /** * Return list of payment methods * - * @param selected Id du mode de paiement pre-selectionne - * @param htmlname Nom de la zone select - * @param filtertype To filter on field type in llx_c_paiement (array('code'=>xx,'label'=>zz)) - * @param format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code - * @param empty 1=peut etre vide, 0 sinon - * @param noadmininfo 0=Add admin info, 1=Disable admin info - * @param maxlength Max length of label + * @param string $selected Id du mode de paiement pre-selectionne + * @param string $htmlname Nom de la zone select + * @param string $filtertype To filter on field type in llx_c_paiement (array('code'=>xx,'label'=>zz)) + * @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code + * @param int $empty 1=peut etre vide, 0 sinon + * @param int $noadmininfo 0=Add admin info, 1=Disable admin info + * @param int $maxlength Max length of label + * @return void */ function select_types_paiements($selected='',$htmlname='paiementtype',$filtertype='',$format=0, $empty=0, $noadmininfo=0,$maxlength=0) { global $langs,$user; - dol_syslog("Form::select_type_paiements $selected, $htmlname, $filtertype, $format",LOG_DEBUG); + dol_syslog(get_class($this)."::select_type_paiements ".$selected.", ".$htmlname.", ".$filtertype.", ".$format,LOG_DEBUG); $filterarray=array(); if ($filtertype == 'CRDT') $filterarray=array(0,2); @@ -1904,8 +1911,9 @@ class Form /** * Selection HT or TTC * - * @param selected Id pre-selectionne - * @param htmlname Nom de la zone select + * @param string $selected Id pre-selectionne + * @param string $htmlname Nom de la zone select + * @return void */ function select_PriceBaseType($selected='',$htmlname='price_base_type') { @@ -1916,8 +1924,9 @@ class Form /** * Selection HT or TTC * - * @param selected Id pre-selectionne - * @param htmlname Nom de la zone select + * @param string $selected Id pre-selectionne + * @param string $htmlname Nom de la zone select + * @return void */ function load_PriceBaseType($selected='',$htmlname='price_base_type') { @@ -1927,8 +1936,8 @@ class Form $return.= '