From 1f10e4e1e33d4804c51e2905ece0fc3539d8122e Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Fri, 27 Jan 2012 15:17:36 +0100
Subject: [PATCH] Doxygen

---
 htdocs/core/class/html.formactions.class.php | 42 +++++++++---------
 htdocs/core/class/html.formadmin.class.php   |  8 ++--
 htdocs/core/class/html.formbarcode.class.php |  6 +--
 htdocs/core/class/html.formcompany.class.php |  7 ++-
 htdocs/core/class/html.formfile.class.php    |  3 +-
 htdocs/core/class/html.formmail.class.php    | 37 +++++++++-------
 htdocs/core/class/html.formorder.class.php   | 35 ++++++++-------
 htdocs/core/class/html.formother.class.php   | 45 ++++++++++----------
 8 files changed, 94 insertions(+), 89 deletions(-)

diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php
index 062ad198f73..2fcf2442956 100644
--- a/htdocs/core/class/html.formactions.class.php
+++ b/htdocs/core/class/html.formactions.class.php
@@ -1,5 +1,5 @@
 <?php
-/* Copyright (c) 2008-2011 Laurent Destailleur  <eldy@users.sourceforge.net>
+/* Copyright (c) 2008-2012 Laurent Destailleur  <eldy@users.sourceforge.net>
  * Copyright (C) 2010-2011 Regis Houssin        <regis@dolibarr.fr>
  * Copyright (C) 2010      Juanjo Menent        <jmenent@2byte.es>
  *
@@ -25,8 +25,7 @@
 
 
 /**
- *      \class  FormActions
- *      \brief  Class to manage building of HTML components
+ *      Class to manage building of HTML components
  */
 class FormActions
 {
@@ -37,23 +36,23 @@ class FormActions
     /**
 	 *	Constructor
 	 *
-	 *  @param		DoliDB		$DB      Database handler
+	 *  @param		DoliDB		$db      Database handler
      */
-    function FormActions($DB)
+    function FormActions($db)
     {
-        $this->db = $DB;
-
+        $this->db = $db;
         return 1;
     }
 
 
     /**
-     *      Show list of action status
+     *  Show list of action status
      *
-     * 		@param		formname	Name of form where select in included
-     * 		@param		selected	Preselected value
-     * 		@param		canedit		1=can edit, 0=read only
-     *      @param      htmlname    Name of html prefix for html fields (selectX and valX)
+     * 	@param	string	$formname	Name of form where select in included
+     * 	@param	string	$selected	Preselected value
+     * 	@param	int		$canedit	1=can edit, 0=read only
+     *  @param  string	$htmlname   Name of html prefix for html fields (selectX and valX)
+     * 	@return	void
      */
     function form_select_status_action($formname,$selected,$canedit=1,$htmlname='complete')
     {
@@ -101,11 +100,12 @@ class FormActions
 
 
     /**
-     *    	Show list of actions for element
-     *    	@param      object			Object
-     *    	@param      typeelement		'invoice','propal','order','invoice_supplier','order_supplier','fichinter'
-     *		@param		socid			socid of user
-     *		@return		int				<0 if KO, >=0 if OK
+     *  Show list of actions for element
+     * 
+     *  @param	Object	$object			Object
+     *  @param  string	$typeelement	'invoice','propal','order','invoice_supplier','order_supplier','fichinter'
+     *	@param	int		$socid			socid of user
+     *	@return	int						<0 if KO, >=0 if OK
      */
     function showactions($object,$typeelement,$socid=0)
     {
@@ -159,9 +159,11 @@ class FormActions
 
 
     /**
-     *    Output list of type of event
-     *    @param      selected        Type pre-selectionne
-     *    @param      htmlname        Nom champ formulaire
+     *  Output list of type of event
+     * 
+     *  @param	string		$selected        Type pre-selectionne
+     *  @param  string		$htmlname        Nom champ formulaire
+     * 	@return	void
      */
     function select_type_actions($selected='',$htmlname='actioncode')
     {
diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php
index d408b7d8ee6..b7ac9f7e49b 100644
--- a/htdocs/core/class/html.formadmin.class.php
+++ b/htdocs/core/class/html.formadmin.class.php
@@ -1,5 +1,5 @@
 <?php
-/* Copyright (C) 2004-2011 Laurent Destailleur  <eldy@users.sourceforge.net>
+/* Copyright (C) 2004-2012 Laurent Destailleur  <eldy@users.sourceforge.net>
  * Copyright (C) 2005-2011 Regis Houssin        <regis@dolibarr.fr>
  * Copyright (C) 2007      Patrick Raguin 		<patrick.raguin@gmail.com>
  *
@@ -25,8 +25,7 @@
 
 
 /**
- *       \class      FormAdmin
- *       \brief      Class to generate html code for admin pages
+ *      Class to generate html code for admin pages
  */
 class FormAdmin
 {
@@ -42,7 +41,6 @@ class FormAdmin
 	function FormAdmin($db)
 	{
 		$this->db = $db;
-
 		return 1;
 	}
 
@@ -279,7 +277,7 @@ class FormAdmin
 
 
     /**
-     *  Retourne la liste deroulante des menus disponibles (eldy)
+     *  Return a HTML select list of timezones
      *
      *  @param	string		$selected        Menu pre-selectionnee
      *  @param  string		$htmlname        Nom de la zone select
diff --git a/htdocs/core/class/html.formbarcode.class.php b/htdocs/core/class/html.formbarcode.class.php
index cd526042024..1eb70c4ae3b 100644
--- a/htdocs/core/class/html.formbarcode.class.php
+++ b/htdocs/core/class/html.formbarcode.class.php
@@ -1,6 +1,6 @@
 <?php
 /* Copyright (C) 2007-2011 Regis Houssin        <regis@dolibarr.fr>
- * Copyright (C) 2008-2011 Laurent Destailleur  <eldy@users.sourceforge.net>
+ * Copyright (C) 2008-2012 Laurent Destailleur  <eldy@users.sourceforge.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
@@ -24,8 +24,7 @@
 
 
 /**
- *       \class      Form
- *       \brief      Classe permettant la generation de composants html
+ *      Class to manage barcode HTML
  */
 class FormBarCode
 {
@@ -41,7 +40,6 @@ class FormBarCode
     function FormBarCode($db)
     {
         $this->db = $db;
-
         return 1;
     }
 
diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php
index 7f22b659c1f..6c20b913a4c 100644
--- a/htdocs/core/class/html.formcompany.class.php
+++ b/htdocs/core/class/html.formcompany.class.php
@@ -1,5 +1,5 @@
 <?php
-/* Copyright (C) 2008-2009 Laurent Destailleur  <eldy@users.sourceforge.net>
+/* Copyright (C) 2008-2012 Laurent Destailleur  <eldy@users.sourceforge.net>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -23,9 +23,8 @@
 
 
 /**
- *	\class      FormCompany
- *	\brief      Class to build HTML component for third parties management
- *	\remarks	Only common components must be here.
+ *	Class to build HTML component for third parties management
+ *	Only common components are here.
  */
 class FormCompany
 {
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index eff452e6ff2..0aa977fadb2 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -25,8 +25,7 @@
 
 
 /**
- *	\class      FormFile
- *	\brief      Class to offer components to list and upload files
+ *	Class to offer components to list and upload files
  */
 class FormFile
 {
diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index 092dd13f6c1..7d95b981b1a 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -1,5 +1,5 @@
 <?PHP
-/* Copyright (C) 2005-2011 Laurent Destailleur  <eldy@users.sourceforge.net>
+/* Copyright (C) 2005-2012 Laurent Destailleur  <eldy@users.sourceforge.net>
  * Copyright (C) 2005-2011 Regis Houssin		<regis@dolibarr.fr>
  * Copyright (C) 2010-2011 Juanjo Menent		<jmenent@2byte.es>
  *
@@ -25,11 +25,11 @@
 require_once(DOL_DOCUMENT_ROOT ."/core/class/html.form.class.php");
 
 
-/**     \class      FormMail
- *      \brief      Classe permettant la generation du formulaire html d'envoi de mail unitaire
- *      \remarks    Utilisation: $formail = new FormMail($db)
- *      \remarks                 $formmail->proprietes=1 ou chaine ou tableau de valeurs
- *      \remarks                 $formmail->show_form() affiche le formulaire
+/**
+ *      Classe permettant la generation du formulaire html d'envoi de mail unitaire
+ *      Usage: $formail = new FormMail($db)
+ *             $formmail->proprietes=1 ou chaine ou tableau de valeurs
+ *             $formmail->show_form() affiche le formulaire
  */
 class FormMail
 {
@@ -69,12 +69,13 @@ class FormMail
 
 
     /**
-     *	\brief     Constructeur
-     *  \param     DB      handler d'acces base de donnee
+     *	Constructor
+     *
+     *  @param	DoliDB	$DB      Database handler
      */
-    function FormMail($DB)
+    function FormMail($db)
     {
-        $this->db = $DB;
+        $this->db = $db;
 
         $this->withform=1;
 
@@ -103,6 +104,8 @@ class FormMail
 
     /**
      * Clear list of attached files in send mail form (stored in session)
+     * 
+     * @return	void
      */
     function clear_attached_files()
     {
@@ -125,6 +128,7 @@ class FormMail
      * @param 	string   $path   Full absolute path on filesystem of file, including file name
      * @param 	string   $file   Only filename
      * @param 	string   $type   Mime type
+     * @return	void
      */
     function add_attached_files($path,$file,$type)
     {
@@ -148,7 +152,8 @@ class FormMail
     /**
      * Remove a file from the list of attached files (stored in SECTION array)
      *
-     * @param  $keytodelete     Key in file array
+     * @param  	string	$keytodelete     Key in file array
+     * @return	void
      */
     function remove_attached_files($keytodelete)
     {
@@ -190,8 +195,9 @@ class FormMail
      *	Show the form to input an email
      *  this->withfile: 0=No attaches files, 1=Show attached files, 2=Can add new attached files
      *
-     *	@param			addfileaction		Name of action when posting file attachments
-     *	@param			removefileaction	Name of action when removing file attachments
+     *	@param	string	$addfileaction		Name of action when posting file attachments
+     *	@param	string	$removefileaction	Name of action when removing file attachments
+     *	@return	void
      */
     function show_form($addfileaction='addfile',$removefileaction='removefile')
     {
@@ -202,8 +208,9 @@ class FormMail
      *	Get the form to input an email
      *  this->withfile: 0=No attaches files, 1=Show attached files, 2=Can add new attached files
      *
-     *	@param			addfileaction		Name of action when posting file attachments
-     *	@param			removefileaction	Name of action when removing file attachments
+     *	@param	string	$addfileaction		Name of action when posting file attachments
+     *	@param	string	$removefileaction	Name of action when removing file attachments
+     *	@return string						Form to show
      */
     function get_form($addfileaction='addfile',$removefileaction='removefile')
     {
diff --git a/htdocs/core/class/html.formorder.class.php b/htdocs/core/class/html.formorder.class.php
index 68c4a21b688..0b2e6a999df 100644
--- a/htdocs/core/class/html.formorder.class.php
+++ b/htdocs/core/class/html.formorder.class.php
@@ -1,5 +1,5 @@
 <?php
-/* Copyright (C) 2008 Laurent Destailleur  <eldy@users.sourceforge.net>
+/* Copyright (C) 2008-2012 Laurent Destailleur  <eldy@users.sourceforge.net>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -23,9 +23,8 @@
 
 
 /**
- *	\class      FormOrder
- *	\brief      Classe permettant la generation de composants html
- *	\remarks	Only common components must be here.
+ *	Classe permettant la generation de composants html
+ *	Only common components are here.
  */
 class FormOrder
 {
@@ -35,24 +34,24 @@ class FormOrder
 
 
 	/**
-	 *	\brief     Constructeur
-	 *	\param     DB      handler d'acces base de donnee
+	 *	Constructor
+	 *
+	 *	@param	DoliDB	$db		Database handler
 	 */
-	function FormOrder($DB)
+	function FormOrder($db)
 	{
-		$this->db = $DB;
-
+		$this->db = $db;
 		return 1;
 	}
 
 
 	/**
-	 *  Renvoie la liste des sources de commandes
+	 *  Return list of way to order
 	 * 
-	 *	@param      selected		Id de la source pre-selectionnee
-	 *  @param     	htmlname 		Nom de la liste deroulante
-	 *  @param     	addempty		0=liste sans valeur nulle, 1=ajoute valeur inconnue
-	 *  @return		array			Tableau des sources de commandes
+	 *	@param	string	$selected		Id of preselected order origin
+	 *  @param  string	$htmlname 		Name of HTML select list
+	 *  @param  int		$addempty		0=liste sans valeur nulle, 1=ajoute valeur inconnue
+	 *  @return	array					Tableau des sources de commandes
 	 */
 	function selectSourcesCommande($selected='',$htmlname='source_id',$addempty=0)
 	{
@@ -74,8 +73,12 @@ class FormOrder
 
 
 	/**
+	 *	Return list of way to order
 	 *
-	 *
+	 *	@param	string	$selected		Id of preselected input method
+	 *  @param  string	$htmlname 		Name of HTML select list
+	 *  @param  int		$addempty		0=liste sans valeur nulle, 1=ajoute valeur inconnue
+	 *  @return	array					Tableau des sources de commandes
 	 */
 	function select_methodes_commande($selected='',$htmlname='source_id',$addempty=0)
 	{
@@ -89,7 +92,7 @@ class FormOrder
 		$sql.= " FROM ".MAIN_DB_PREFIX."c_input_method";
 		$sql.= " WHERE active = 1";
 
-		dol_syslog("Form::select_methodes_commande sql=".$sql);
+		dol_syslog(get_class($this)."::select_methodes_commande sql=".$sql);
 		$resql=$this->db->query($sql);
 		if ($resql)
 		{
diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php
index 16682a7b7a2..09e00ed12cf 100644
--- a/htdocs/core/class/html.formother.class.php
+++ b/htdocs/core/class/html.formother.class.php
@@ -1,6 +1,6 @@
 <?php
 /* Copyright (c) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2004-2011 Laurent Destailleur  <eldy@users.sourceforge.net>
+ * Copyright (C) 2004-2012 Laurent Destailleur  <eldy@users.sourceforge.net>
  * Copyright (C) 2004      Benoit Mortier       <benoit.mortier@opensides.be>
  * Copyright (C) 2004      Sebastien Di Cintio  <sdicintio@ressource-toi.org>
  * Copyright (C) 2004      Eric Seigne          <eric.seigne@ryxeo.com>
@@ -32,9 +32,8 @@
 
 
 /**
- *	\class      FormOther
- *	\brief      Classe permettant la generation de composants html autre
- *	\remarks	Only common components must be here.
+ *	Classe permettant la generation de composants html autre
+ *	Only common components are here.
  */
 class FormOther
 {
@@ -210,12 +209,12 @@ class FormOther
 	/**
 	 *    Return a HTML select list to select a percent
 	 *
-	 *    @param     selected      pourcentage pre-selectionne
-	 *    @param     htmlname      nom de la liste deroulante
-	 *    @param     increment     increment value
-	 *    @param     start         start value
-	 *    @param     end           end value
-	 *    @return    return        combo
+	 *    @param	string	$selected      	pourcentage pre-selectionne
+	 *    @param    string	$htmlname      	nom de la liste deroulante
+	 *    @param    int		$increment     	increment value
+	 *    @param    int		$start         	start value
+	 *    @param    int		$end           	end value
+	 *    @return   string					HTML select string
 	 */
 	function select_percent($selected=0,$htmlname='percent',$disabled=0,$increment=5,$start=0,$end=100)
 	{
@@ -243,10 +242,10 @@ class FormOther
 	/**
 	 *  Return select list for categories (to use in form search selectors)
 	 *
-	 *	@param    	type			Type of categories (0=product, 1=suppliers, 2=customers, 3=members)
-	 *  @param     	selected     	Preselected value
-	 *  @param     	htmlname      	Name of combo list
-	 *  @return    	return        	Html combo list code
+	 *	@param	int		$type			Type of categories (0=product, 1=suppliers, 2=customers, 3=members)
+	 *  @param  string	$selected     	Preselected value
+	 *  @param  string	$htmlname      	Name of combo list
+	 *  @return string		        	Html combo list code
 	 */
 	function select_categories($type,$selected=0,$htmlname='search_categ')
 	{
@@ -279,10 +278,10 @@ class FormOther
 	/**
 	 *  Return select list for categories (to use in form search selectors)
 	 *
-	 *  @param     	selected     	Preselected value
-	 *  @param     	htmlname      	Name of combo list
-	 *  @param      user            Object user
-	 *  @return    	return        	Html combo list code
+	 *  @param	string	$selected     	Preselected value
+	 *  @param  string	$htmlname      	Name of combo list
+	 *  @param  User	$user           Object user
+	 *  @return string					Html combo list code
 	 */
 	function select_salesrepresentatives($selected=0,$htmlname='search_sale',$user)
 	{
@@ -373,11 +372,11 @@ class FormOther
 	/**
 	 *		Output a HTML code to select a color
 	 *
-	 *		@param	set_color		Pre-selected color
-	 *		@param	prefix			Name of HTML field
-	 *		@param	form_name		Name of form
-	 * 		@param	showcolorbox	1=Show color code and color box, 0=Show only color code
-	 * 		@param 	arrayofcolors	Array of colors. Example: array('29527A','5229A3','A32929','7A367A','B1365F','0D7813')
+	 *		@param	string		$set_color		Pre-selected color
+	 *		@param	string		$prefix			Name of HTML field
+	 *		@param	string		$form_name		Name of form
+	 * 		@param	int			$showcolorbox	1=Show color code and color box, 0=Show only color code
+	 * 		@param 	array		$arrayofcolors	Array of colors. Example: array('29527A','5229A3','A32929','7A367A','B1365F','0D7813')
 	 * 		@return	void
 	 */
 	function select_color($set_color='', $prefix='f_color', $form_name='objForm', $showcolorbox=1, $arrayofcolors='')
-- 
GitLab