From bf1a49c75d3bc9701d987b75a7b07d7ed8e22387 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 12 Sep 2011 17:43:31 +0000 Subject: [PATCH] Doxygen --- htdocs/adherents/class/adherent.class.php | 33 +++------ htdocs/comm/propal/class/propal.class.php | 41 +++++------ htdocs/core/class/smtps.class.php | 88 +++++++++++------------ htdocs/lib/pdf.lib.php | 8 +-- htdocs/main.inc.php | 3 - 5 files changed, 77 insertions(+), 96 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 944d7772e85..376a800dc5b 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -143,7 +143,7 @@ class Adherent extends CommonObject * @param addr_bcc email bcc * @param deliveryreceipt demande accuse reception * @param msgishtml 1=String IS already html, 0=String IS NOT html, -1=Unknown need autodetection - * @param errors_to erros to + * @param errorsto erros to * @return int <0 if KO, >0 if OK */ function send_an_email($text, $subject, $filename_list=array(), $mimetype_list=array(), $mimefilename_list=array(), $addr_cc="", $addr_bcc="", $deliveryreceipt=0, $msgishtml=-1, $errors_to='') @@ -1454,7 +1454,6 @@ class Adherent extends CommonObject /** * Fonction qui dit si cet utilisateur est un redacteur existant dans spip - * * @return int 1=existe, 0=n'existe pas, -1=erreur */ function is_in_spip() @@ -1477,19 +1476,20 @@ class Adherent extends CommonObject { if ($mydb->num_rows($result)) { - // nous avons au moins une reponse + # nous avons au moins une reponse $mydb->close($result); return 1; } else { - // nous n'avons pas de reponse => n'existe pas + # nous n'avons pas de reponse => n'existe pas $mydb->close($result); return 0; } } else { + # error $this->error=$mydb->error(); return -1; } @@ -1502,7 +1502,6 @@ class Adherent extends CommonObject /** * Subscribe an email to all mailing-lists - * * @param listes To force mailing-list (string separated with ,) * @return int <=0 if KO, >0 if OK */ @@ -1545,7 +1544,7 @@ class Adherent extends CommonObject $this->pass, $conf->global->ADHERENT_MAILMAN_ADMINPW ); - $curl_url = preg_replace($patterns, $replace, $conf->global->ADHERENT_MAILMAN_URL); + $curl_url = preg_replace ($patterns, $replace, $conf->global->ADHERENT_MAILMAN_URL); dol_syslog("Call URL to subscribe : ".$curl_url); $ch = curl_init(); @@ -1559,7 +1558,7 @@ class Adherent extends CommonObject //curl_setopt($ch, CURLOPT_POSTFIELDS, "a=3&b=5"); //--- Start buffering //ob_start(); - $result=curl_exec($ch); + $result=curl_exec ($ch); dol_syslog($result); //--- End buffering and clean output //ob_end_clean(); @@ -1568,7 +1567,7 @@ class Adherent extends CommonObject // error return -2; } - curl_close($ch); + curl_close ($ch); } return 1; @@ -1583,7 +1582,6 @@ class Adherent extends CommonObject /** * Unsubscribe an email from all mailing-lists * Used when a user is resiliated - * * @param listes To force mailing-list (string separated with ,) * @return int <=0 if KO, >0 if OK */ @@ -1631,7 +1629,7 @@ class Adherent extends CommonObject //curl_setopt($ch, CURLOPT_POSTFIELDS, "a=3&b=5"); //--- Start buffering //ob_start(); - $result=curl_exec($ch); + $result=curl_exec ($ch); dol_syslog($result); //--- End buffering and clean output //ob_end_clean(); @@ -1642,7 +1640,7 @@ class Adherent extends CommonObject // error return -2; } - curl_close($ch); + curl_close ($ch); } return 1; @@ -1656,7 +1654,6 @@ class Adherent extends CommonObject /** * Return full name (civility+' '+name+' '+lastname) - * * @param langs Language object for translation of civility * @param option 0=No option, 1=Add civility * @param nameorder -1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname @@ -1694,7 +1691,6 @@ class Adherent extends CommonObject /** * Return label of a civility of a contact - * * @param nohtmlentities 0=Encode with htmlentities for HTML output, 1=No htmlentities for memory translation * @return string Name translated of civility */ @@ -1710,7 +1706,6 @@ class Adherent extends CommonObject /** * Renvoie nom clicable (avec eventuellement le picto) - * * @param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul * @param maxlen length max libelle * @param option Page lien @@ -1745,7 +1740,6 @@ class Adherent extends CommonObject /** * Return full address of member - * * @param withcountry 1=Add country into address string * @param sep Separator to use to build string * @return string Full address string @@ -1771,7 +1765,6 @@ class Adherent extends CommonObject /** * Retourne le libelle du statut d'un adherent (brouillon, valide, resilie) - * * @param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ @@ -1782,7 +1775,6 @@ class Adherent extends CommonObject /** * Renvoi le libelle d'un statut donne - * * @param statut Id statut * @param need_subscription 1 si type adherent avec cotisation, 0 sinon * @param date_end_subscription Date fin adhesion @@ -1864,7 +1856,6 @@ class Adherent extends CommonObject /** * Charge indicateurs this->nb de tableau de bord - * * @return int <0 si ko, >0 si ok */ function load_state_board() @@ -1898,7 +1889,6 @@ class Adherent extends CommonObject /** * Load indicators for dashboard (this->nbtodo and this->nbtodolate) - * * @param user Objet user * @return int <0 if KO, >0 if OK */ @@ -1989,7 +1979,6 @@ class Adherent extends CommonObject /** * Retourne chaine DN complete dans l'annuaire LDAP pour l'objet - * * @param info Info string loaded by _load_ldap_info * @param mode 0=Return full DN (uid=qqq,ou=xxx,dc=aaa,dc=bbb) * 1=Return DN without key inside (ou=xxx,dc=aaa,dc=bbb) @@ -2009,7 +1998,6 @@ class Adherent extends CommonObject /** * Initialise tableau info (tableau des attributs LDAP) - * * @return array Tableau info des attributs */ function _load_ldap_info() @@ -2056,8 +2044,7 @@ class Adherent extends CommonObject /** * Charge les informations d'ordre info dans l'objet adherent - * - * @param int $id Id of member to load + * @param id Id du membre a charger */ function info($id) { diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 1ab5857648b..9c8328f0071 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -279,29 +279,26 @@ class Propal extends CommonObject /** * Add a proposal line into database (linked to product/service or not) - * Les parametres sont deja cense etre juste et avec valeurs finales a l'appel - * de cette methode. Aussi, pour le taux tva, il doit deja avoir ete defini - * par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,'',produit) - * et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue) - * - * @param propalid Id de la propale - * @param desc Description de la ligne - * @param pu_ht Prix unitaire - * @param qty Quantite - * @param txtva Taux de tva - * @param txlocaltax1 Local tax 1 rate - * @param txlocaltax2 Local tax 2 rate - * @param fk_product Id du produit/service predefini - * @param remise_percent Pourcentage de remise de la ligne - * @param price_base_type HT or TTC - * @param pu_ttc Prix unitaire TTC - * @param info_bits Bits de type de lignes - * @param type Type of line (product, service) - * @param rang Position of line - * @param special_code Special code - * @param fk_parent_line Id of parent line - * @return int >0 if OK, <0 if KO + * \param propalid Id de la propale + * \param desc Description de la ligne + * \param pu_ht Prix unitaire + * \param qty Quantite + * \param txtva Taux de tva + * \param txlocaltax1 Local tax 1 rate + * \param txlocaltax2 Local tax 2 rate + * \param fk_product Id du produit/service predefini + * \param remise_percent Pourcentage de remise de la ligne + * \param price_base_type HT or TTC + * \param pu_ttc Prix unitaire TTC + * \param info_bits Bits de type de lignes + * \param type Type of line (product, service) + * \param rang Position of line + * \return int >0 if OK, <0 if KO * @see add_product + * \remarks Les parametres sont deja cense etre juste et avec valeurs finales a l'appel + * de cette methode. Aussi, pour le taux tva, il doit deja avoir ete defini + * par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,'',produit) + * et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue) */ function addline($propalid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $pu_ttc=0, $info_bits=0, $type=0, $rang=-1, $special_code=0, $fk_parent_line=0) { diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index b7bb607e93b..ea002ee18b5 100755 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -565,8 +565,8 @@ class SMTPs * This is defaulted to 'localhost' * This is used only with 'socket' based mail transmission * - * @param string $_strHost Host Name or IP of the Mail Server to use - * @return void + * @param string $_strHost Host Name or IP of the Mail Server to use + * @return void */ function setHost($_strHost) { @@ -578,7 +578,7 @@ class SMTPs * Retrieves the Host Name or IP of the Mail Server to use * This is used only with 'socket' based mail transmission * - * @return string $_strHost Host Name or IP of the Mail Server to use + * @return string $_strHost Host Name or IP of the Mail Server to use */ function getHost() { @@ -590,8 +590,8 @@ class SMTPs * This is defaulted to '25' * This is used only with 'socket' based mail transmission * - * @param int $_intPort Port Number of the Mail Server to use - * @return void + * @param int $_smtpsPort Port Number of the Mail Server to use + * @return void */ function setPort($_intPort) { @@ -604,7 +604,7 @@ class SMTPs * Retrieves the Port Number of the Mail Server to use * This is used only with 'socket' based mail transmission * - * @return string Port Number of the Mail Server to use + * @return string $_smtpsPort Port Number of the Mail Server to use */ function getPort() { @@ -614,10 +614,10 @@ class SMTPs /** * User Name for authentication on Mail Server * - * @param string $_strID User Name for authentication on Mail Server - * @return void + * @param string $_strID User Name for authentication on Mail Server + * @return void */ - function setID($_strID) + function setID($_strID ) { $this->_smtpsID = $_strID; } @@ -625,7 +625,7 @@ class SMTPs /** * Retrieves the User Name for authentication on Mail Server * - * @return string User Name for authentication on Mail Server + * @return string _smtpsID User Name for authentication on Mail Server */ function getID() { @@ -635,8 +635,8 @@ class SMTPs /** * User Password for authentication on Mail Server * - * @param string $_strPW User Password for authentication on Mail Server - * @return void + * @param string $_strPW User Password for authentication on Mail Server + * @return void */ function setPW($_strPW) { @@ -646,7 +646,7 @@ class SMTPs /** * Retrieves the User Password for authentication on Mail Server * - * @return string User Password for authentication on Mail Server + * @return string $_smtpsPW User Password for authentication on Mail Server */ function getPW() { @@ -732,7 +732,7 @@ class SMTPs /** * Retrieves the Content-Transfer-Encoding * - * @return string Content-Transfer-Encoding + * @return string $_smtpsTransEncode Content-Transfer-Encoding */ function getTransEncodeType() { @@ -780,8 +780,8 @@ class SMTPs * structured array. This array is designed to remove duplicate * addresses and to sort them by Domain. * - * @param string $_type TO, CC, or BCC lists to add addrresses into - * @param mixed $_addrList Array or COMMA delimited string of addresses + * @param string $_type TO, CC, or BCC lists to add addrresses into + * @param mixed $_addrList Array or COMMA delimited string of addresses * @return void * */ @@ -854,8 +854,7 @@ class SMTPs * - $_aryEmail[host] = "domain.tld" * - $_aryEmail[user] = "userName" * - * @param string $_strAddr Email address - * @return array An array of the various parts of an email address + * @return array $_aryEmail An array of the various parts of an email address */ function _strip_email($_strAddr) { @@ -897,7 +896,7 @@ class SMTPs * This is a "build as you go" method. Each time this method is called * the underlaying array is destroyed and reconstructed. * - * @return array Returns an array of bares addresses + * @return array $_RCPT_list Returns an array of bares addresses */ function get_RCPT_list() { @@ -925,10 +924,10 @@ class SMTPs /** * Returns an array of addresses for a specific type; TO, CC or BCC * - * @param mixed $_which Which collection of adresses to return - * @return array Array of emaill address + * @param mixed $_which Which collection of adresses to return + * @return array $_RCPT_list Array of emaill address */ - function get_email_list($_which = null) + function get_email_list( $_which = null ) { // We need to know which address segment to pull if ( $_which ) @@ -976,10 +975,10 @@ class SMTPs /** * TO Address[es] inwhich to send mail to * - * @param mixed $_addrTo TO Address[es] inwhich to send mail to - * @return void + * @param mixed $_addrTo TO Address[es] inwhich to send mail to + * @return void */ - function setTO($_addrTo) + function setTO ( $_addrTo ) { if ( $_addrTo ) $this->_buildAddrList( 'to', $_addrTo ); @@ -988,7 +987,7 @@ class SMTPs /** * Retrieves the TO Address[es] inwhich to send mail to * - * @return string TO Address[es] inwhich to send mail to + * @return string $_msgRecipients TO Address[es] inwhich to send mail to */ function getTo() { @@ -998,8 +997,8 @@ class SMTPs /** * CC Address[es] inwhich to send mail to * - * @param string $_strCC CC Address[es] inwhich to send mail to - * @return void + * @param string $_msgRecipients CC Address[es] inwhich to send mail to + * @return void */ function setCC($_strCC) { @@ -1010,7 +1009,7 @@ class SMTPs /** * Retrieves the CC Address[es] inwhich to send mail to * - * @return string CC Address[es] inwhich to send mail to + * @return string $_msgRecipients CC Address[es] inwhich to send mail to */ function getCC() { @@ -1020,8 +1019,8 @@ class SMTPs /** * BCC Address[es] inwhich to send mail to * - * @param string $_strBCC Recipients BCC Address[es] inwhich to send mail to - * @return void + * @param string $_msgRecipients BCC Address[es] inwhich to send mail to + * @return void */ function setBCC($_strBCC) { @@ -1032,7 +1031,7 @@ class SMTPs /** * Retrieves the BCC Address[es] inwhich to send mail to * - * @return string BCC Address[es] inwhich to send mail to + * @return string $_msgRecipients BCC Address[es] inwhich to send mail to */ function getBCC() { @@ -1042,8 +1041,8 @@ class SMTPs /** * Message Subject * - * @param string $_strSubject Message Subject - * @return void + * @param string $_msgSubject Message Subject + * @return void */ function setSubject($_strSubject = '') { @@ -1054,7 +1053,7 @@ class SMTPs /** * Retrieves the Message Subject * - * @return string Message Subject + * @return string $_msgSubject Message Subject */ function getSubject() { @@ -1335,8 +1334,8 @@ class SMTPs * - [2] Private * - [3] Company Confidential * - * @param string $_value Message Sensitivity - * @return void + * @param string $_value Message Sensitivity + * @return void */ function setSensitivity($_value = 0) { @@ -1353,8 +1352,8 @@ class SMTPs * - [2] Private * - [3] Company Confidential * - * @param string Message Sensitivity - * @return void + * @param string $_msgSensitivity Message Sensitivity + * @return void */ function getSensitivity() { @@ -1371,8 +1370,8 @@ class SMTPs * - [4] 'Low' * - [5] 'Lowest' * - * @param string $_value Message Priority - * @return void + * @param string $_value Message Priority + * @return void */ function setPriority ( $_value = 3 ) { @@ -1391,6 +1390,7 @@ class SMTPs * - [4] 'Low' * - [5] 'Lowest' * + * @param string $_value Message Priority * @return void */ function getPriority() @@ -1403,8 +1403,8 @@ class SMTPs /** * Set flag which determines whether to calculate message MD5 checksum. * - * @param string $_flag Message Priority - * @return void + * @param string $_value Message Priority + * @return void */ function setMD5flag($_flag = false) { @@ -1414,7 +1414,7 @@ class SMTPs /** * Gets flag which determines whether to calculate message MD5 checksum. * - * @return string Message Priority + * @return string $_value Message Priority */ function getMD5flag() { diff --git a/htdocs/lib/pdf.lib.php b/htdocs/lib/pdf.lib.php index 8396d89bb6a..bcd27ef7ef5 100644 --- a/htdocs/lib/pdf.lib.php +++ b/htdocs/lib/pdf.lib.php @@ -299,7 +299,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target * Show header of page for PDF generation * * @param PDF $pdf Object PDF - * @param Translate $outputlangs Object lang for output + * @param Translate $outputlang Object lang for output * @param int $page_height Height of page */ function pdf_pagehead(&$pdf,$outputlangs,$page_height) @@ -1193,9 +1193,9 @@ function pdf_getTotalQty($object,$type='',$outputlangs,$hookmanager=false) /** * Convert a currency code into its symbol * - * @param PDF $pdf PDF object - * @param string $currency_code Currency code - * @return string Currency symbol encoded into UTF8 + * @param pdf PDF object + * @param currency_code Currency code + * @param string Currency symbol encoded into UTF8 */ function pdf_getCurrencySymbol(&$pdf, $currency_code) { diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 8d51312eaf9..78cb30beddf 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -67,7 +67,6 @@ if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* removed in PHP6 * * @param string $val Value * @param string $get 1=GET, 0=POST - * @return boolean true if ther is an injection */ function test_sql_and_script_inject($val, $get) { @@ -92,7 +91,6 @@ function test_sql_and_script_inject($val, $get) * * @param string $var Variable name * @param string $get 1=GET, 0=POST - * @return boolean true if ther is an injection */ function analyse_sql_and_script(&$var, $get) { @@ -117,7 +115,6 @@ function analyse_sql_and_script(&$var, $get) return (test_sql_and_script_inject($var,$get) <= 0); } } - // Sanity check on URL if (! empty($_SERVER["PHP_SELF"])) {