Qual: Removed useless calls
Doxygen
This commit is contained in:
parent
4cf3ad2f02
commit
53181aa0c1
@ -646,7 +646,7 @@ else
|
||||
else
|
||||
{
|
||||
print '<div class="error">'.$langs->trans("ServerNotAvailableOnIPOrPort",$server,$port);
|
||||
if ($mail->error) print ' - '.$langs->convToOutputCharset($mail->error,'ISO-8859-1');
|
||||
if ($mail->error) print ' - '.$mail->error;
|
||||
print '</div>';
|
||||
}
|
||||
print '<br>';
|
||||
|
||||
@ -306,7 +306,7 @@ else
|
||||
else
|
||||
{
|
||||
print '<div class="error">'.$langs->trans("ServerNotAvailableOnIPOrPort",$server,$port);
|
||||
if ($mail->error) print ' - '.$langs->convToOutputCharset($mail->error,'ISO-8859-1');
|
||||
if ($mail->error) print ' - '.$mail->error;
|
||||
print '</div>';
|
||||
}
|
||||
print '<br>';
|
||||
|
||||
@ -81,19 +81,19 @@ class CMailFile
|
||||
/**
|
||||
* CMailFile
|
||||
*
|
||||
* @param subject Topic/Subject of mail
|
||||
* @param to Recipients emails (RFC 2822: "Nom prenom <email>[, ...]" ou "email[, ...]" ou "<email>[, ...]")
|
||||
* @param from Sender email (RFC 2822: "Nom prenom <email>[, ...]" ou "email[, ...]" ou "<email>[, ...]")
|
||||
* @param msg Message
|
||||
* @param filename_list List of files to attach (full path of filename on file system)
|
||||
* @param mimetype_list List of MIME type of attached files
|
||||
* @param mimefilename_list List of attached file name in message
|
||||
* @param addr_cc Email cc
|
||||
* @param addr_bcc Email bcc
|
||||
* @param deliveryreceipt Ask a delivery receipt
|
||||
* @param msgishtml 1=String IS already html, 0=String IS NOT html, -1=Unknown need autodetection
|
||||
* @param errors_to Email errors
|
||||
* @param css Css option
|
||||
* @param string $subject Topic/Subject of mail
|
||||
* @param string $to Recipients emails (RFC 2822: "Nom prenom <email>[, ...]" ou "email[, ...]" ou "<email>[, ...]")
|
||||
* @param string $from Sender email (RFC 2822: "Nom prenom <email>[, ...]" ou "email[, ...]" ou "<email>[, ...]")
|
||||
* @param string $msg Message
|
||||
* @param array $filename_list List of files to attach (full path of filename on file system)
|
||||
* @param array $mimetype_list List of MIME type of attached files
|
||||
* @param array $mimefilename_list List of attached file name in message
|
||||
* @param string $addr_cc Email cc
|
||||
* @param string $addr_bcc Email bcc
|
||||
* @param int $deliveryreceipt Ask a delivery receipt
|
||||
* @param int $msgishtml 1=String IS already html, 0=String IS NOT html, -1=Unknown need autodetection
|
||||
* @param string $errors_to Email errors
|
||||
* @param string $css Css option
|
||||
*/
|
||||
function CMailFile($subject,$to,$from,$msg,
|
||||
$filename_list=array(),$mimetype_list=array(),$mimefilename_list=array(),
|
||||
@ -524,8 +524,8 @@ class CMailFile
|
||||
/**
|
||||
* Correct an uncomplete html string
|
||||
*
|
||||
* @param $msg
|
||||
* @return
|
||||
* @param string $msg String
|
||||
* @return string Completed string
|
||||
*/
|
||||
function checkIfHTML($msg)
|
||||
{
|
||||
@ -615,9 +615,9 @@ class CMailFile
|
||||
/**
|
||||
* Create header MIME (mode = 'mail')
|
||||
*
|
||||
* @param filename_list
|
||||
* @param mimefilename_list
|
||||
* @return mime headers
|
||||
* @param array $filename_list Array of filenames
|
||||
* @param array $mimefilename_list Array of mime types
|
||||
* @return array mime headers
|
||||
*/
|
||||
function write_mimeheaders($filename_list, $mimefilename_list)
|
||||
{
|
||||
@ -644,7 +644,8 @@ class CMailFile
|
||||
/**
|
||||
* Return email content (mode = 'mail')
|
||||
*
|
||||
* @param msgtext
|
||||
* @param string $msgtext Message string
|
||||
* @return string String content
|
||||
*/
|
||||
function write_body($msgtext)
|
||||
{
|
||||
@ -675,7 +676,7 @@ class CMailFile
|
||||
}
|
||||
|
||||
// Make RFC821 Compliant, replace bare linefeeds
|
||||
$strContent = preg_replace("/(?<!\r)\n/si", "\r\n", $strContent );
|
||||
$strContent = preg_replace("/(?<!\r)\n/si", "\r\n", $strContent);
|
||||
|
||||
//$strContent = rtrim(chunk_split($strContent)); // Function chunck_split seems bugged
|
||||
$strContent = rtrim(wordwrap($strContent));
|
||||
@ -708,10 +709,10 @@ class CMailFile
|
||||
/**
|
||||
* Attach file to email (mode = 'mail')
|
||||
*
|
||||
* @param filename_list Tableau
|
||||
* @param mimetype_list Tableau
|
||||
* @param mimefilename_list Tableau
|
||||
* @return out Chaine fichiers encodes
|
||||
* @param array $filename_list Tableau
|
||||
* @param array $mimetype_list Tableau
|
||||
* @param array $mimefilename_list Tableau
|
||||
* @return string Chaine fichiers encodes
|
||||
*/
|
||||
function write_files($filename_list,$mimetype_list,$mimefilename_list)
|
||||
{
|
||||
@ -753,8 +754,8 @@ class CMailFile
|
||||
/**
|
||||
* Attach an image to email (mode = 'mail')
|
||||
*
|
||||
* @param images_list Tableau
|
||||
* @return out Chaine images encodees
|
||||
* @param array $images_list Tableau
|
||||
* @return string Chaine images encodees
|
||||
*/
|
||||
function write_images($images_list)
|
||||
{
|
||||
@ -784,9 +785,9 @@ class CMailFile
|
||||
/**
|
||||
* Try to create a socket connection
|
||||
*
|
||||
* @param $host Add ssl:// for SSL/TLS.
|
||||
* @param $port Example: 25, 465
|
||||
* @return Socket id if ok, 0 if KO
|
||||
* @param string $host Add ssl:// for SSL/TLS.
|
||||
* @param int $port Example: 25, 465
|
||||
* @return int Socket id if ok, 0 if KO
|
||||
*/
|
||||
function check_server_port($host,$port)
|
||||
{
|
||||
@ -797,11 +798,13 @@ class CMailFile
|
||||
{
|
||||
dol_syslog("Try socket connection to host=".$host." port=".$port);
|
||||
//See if we can connect to the SMTP server
|
||||
if ( $socket = @fsockopen($host, // Host to test, IP or domain. Add ssl:// for SSL/TLS.
|
||||
$port, // which Port number to use
|
||||
$errno, // actual system level error
|
||||
$errstr, // and any text that goes with the error
|
||||
$timeout) ) // timeout for reading/writing data over the socket
|
||||
if ($socket = @fsockopen(
|
||||
$host, // Host to test, IP or domain. Add ssl:// for SSL/TLS.
|
||||
$port, // which Port number to use
|
||||
$errno, // actual system level error
|
||||
$errstr, // and any text that goes with the error
|
||||
$timeout
|
||||
)) // timeout for reading/writing data over the socket
|
||||
{
|
||||
// Windows still does not have support for this timeout function
|
||||
if (function_exists('stream_set_timeout')) stream_set_timeout($socket, $timeout, 0);
|
||||
@ -813,7 +816,7 @@ class CMailFile
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error = 'Error '.$errno.' - '.$errstr;
|
||||
$this->error = utf8_check('Error '.$errno.' - '.$errstr)?'Error '.$errno.' - '.$errstr:utf8_encode('Error '.$errno.' - '.$errstr);
|
||||
}
|
||||
}
|
||||
return $_retVal;
|
||||
@ -823,9 +826,9 @@ class CMailFile
|
||||
* This function has been modified as provided by SirSir to allow multiline responses when
|
||||
* using SMTP Extensions.
|
||||
*
|
||||
* @param socket
|
||||
* @param response
|
||||
* @return boolean
|
||||
* @param Socket $socket Socket
|
||||
* @param string $response Response string
|
||||
* @return boolean true if success
|
||||
*/
|
||||
function server_parse($socket, $response)
|
||||
{
|
||||
@ -853,8 +856,8 @@ class CMailFile
|
||||
/**
|
||||
* Seearch images into html message and init array this->images_encoded if found
|
||||
*
|
||||
* @param images_dir Location of physical images files
|
||||
* @return int >0 if OK, <0 if KO
|
||||
* @param string $images_dir Location of physical images files
|
||||
* @return int >0 if OK, <0 if KO
|
||||
*/
|
||||
function findHtmlImages($images_dir)
|
||||
{
|
||||
@ -943,11 +946,11 @@ class CMailFile
|
||||
/**
|
||||
* Return an address for SMTP protocol
|
||||
*
|
||||
* @param adresses Example: 'John Doe <john@doe.com>' or 'john@doe.com'
|
||||
* @param format 0=Auto, 1=emails with <>, 2=emails without <>
|
||||
* @param encode 1=Encode name to RFC2822
|
||||
* @return string If format 1: '<john@doe.com>' or 'John Doe <john@doe.com>'
|
||||
* If format 2: 'john@doe.com'
|
||||
* @param string $adresses Example: 'John Doe <john@doe.com>' or 'john@doe.com'
|
||||
* @param int $format 0=Auto, 1=emails with <>, 2=emails without <>
|
||||
* @param int $encode 1=Encode name to RFC2822
|
||||
* @return string If format 1: '<john@doe.com>' or 'John Doe <john@doe.com>'
|
||||
* If format 2: 'john@doe.com'
|
||||
*/
|
||||
function getValidAddress($adresses,$format,$encode='')
|
||||
{
|
||||
|
||||
@ -49,8 +49,8 @@ class Translate {
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param dir Force directory that contains /langs subdirectory (value is sometine '..' like into install/* pages or support/* pages).
|
||||
* @param conf Object with Dolibarr configuration
|
||||
* @param string $dir Force directory that contains /langs subdirectory (value is sometine '..' like into install/* pages or support/* pages).
|
||||
* @param Conf $conf Object with Dolibarr configuration
|
||||
*/
|
||||
function Translate($dir = "",$conf)
|
||||
{
|
||||
@ -63,7 +63,7 @@ class Translate {
|
||||
/**
|
||||
* Set accessor for this->defaultlang
|
||||
*
|
||||
* @param srclang Language to use
|
||||
* @param string $srclang Language to use
|
||||
*/
|
||||
function setDefaultLang($srclang='fr_FR')
|
||||
{
|
||||
@ -129,8 +129,8 @@ class Translate {
|
||||
* Return active language code for current user
|
||||
* It's an accessor for this->defaultlang
|
||||
*
|
||||
* @param mode 0=Long language code, 1=Short language code
|
||||
* @return string Language code used (en_US, en_AU, fr_FR, ...)
|
||||
* @param int $mode 0=Long language code, 1=Short language code
|
||||
* @return string Language code used (en_US, en_AU, fr_FR, ...)
|
||||
*/
|
||||
function getDefaultLang($mode=0)
|
||||
{
|
||||
@ -337,8 +337,8 @@ class Translate {
|
||||
* WARNING: To avoid infinite loop (getLabelFromKey->transnoentities->getTradFromKey), getLabelFromKey must
|
||||
* not be called with same value than input.
|
||||
*
|
||||
* @param key
|
||||
* @return string
|
||||
* @param string $key Key to translate
|
||||
* @return string Translated string
|
||||
*/
|
||||
function getTradFromKey($key)
|
||||
{
|
||||
@ -379,13 +379,13 @@ class Translate {
|
||||
* et si toujours pas trouve, il est retourne tel quel
|
||||
* Les parametres de cette methode peuvent contenir de balises HTML.
|
||||
*
|
||||
* @param key cle de chaine a traduire
|
||||
* @param param1 chaine de param1
|
||||
* @param param2 chaine de param2
|
||||
* @param param3 chaine de param3
|
||||
* @param param4 chaine de param4
|
||||
* @param maxsize taille max
|
||||
* @return string Chaine traduite et code en HTML
|
||||
* @param string $key Key to translate
|
||||
* @param string $param1 chaine de param1
|
||||
* @param string $param2 chaine de param2
|
||||
* @param string $param3 chaine de param3
|
||||
* @param string $param4 chaine de param4
|
||||
* @param int $maxsize taille max
|
||||
* @return string Translated string (encoded into HTML entities and UTF8)
|
||||
*/
|
||||
function trans($key, $param1='', $param2='', $param3='', $param4='', $maxsize=0)
|
||||
{
|
||||
@ -400,7 +400,7 @@ class Translate {
|
||||
// We replace some HTML tags by __xx__ to avoid having them encoded by htmlentities
|
||||
$str=str_replace(array('<','>','"',),array('__lt__','__gt__','__quot__'),$str);
|
||||
|
||||
$str=$this->convToOutputCharset($str); // Convert string to $this->charset_output
|
||||
//$str=$this->convToOutputCharset($str); // Convert string to $this->charset_output
|
||||
|
||||
// Crypt string into HTML
|
||||
// $str est une chaine stockee en memoire au format $this->charset_output
|
||||
@ -413,7 +413,7 @@ class Translate {
|
||||
else // Translation is not available
|
||||
{
|
||||
$str=$this->getTradFromKey($key);
|
||||
return $this->convToOutputCharset($str);
|
||||
//return $this->convToOutputCharset($str);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -258,7 +258,7 @@ function html_print_paybox_footer($fromcompany,$langs)
|
||||
$line1="";
|
||||
if ($fromcompany->forme_juridique_code)
|
||||
{
|
||||
$line1.=($line1?" - ":"").$langs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code));
|
||||
$line1.=($line1?" - ":"").getFormeJuridiqueLabel($fromcompany->forme_juridique_code);
|
||||
}
|
||||
// Capital
|
||||
if ($fromcompany->capital)
|
||||
@ -270,14 +270,14 @@ function html_print_paybox_footer($fromcompany,$langs)
|
||||
{
|
||||
$field=$langs->transcountrynoentities("ProfId1",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line1.=($line1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof1);
|
||||
$line1.=($line1?" - ":"").$field.": ".$fromcompany->idprof1;
|
||||
}
|
||||
// Prof Id 2
|
||||
if ($fromcompany->idprof2)
|
||||
{
|
||||
$field=$langs->transcountrynoentities("ProfId2",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line1.=($line1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof2);
|
||||
$line1.=($line1?" - ":"").$field.": ".$fromcompany->idprof2;
|
||||
}
|
||||
|
||||
// Second line of company infos
|
||||
@ -287,19 +287,19 @@ function html_print_paybox_footer($fromcompany,$langs)
|
||||
{
|
||||
$field=$langs->transcountrynoentities("ProfId3",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line2.=($line2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof3);
|
||||
$line2.=($line2?" - ":"").$field.": ".$fromcompany->idprof3;
|
||||
}
|
||||
// Prof Id 4
|
||||
if ($fromcompany->idprof4)
|
||||
{
|
||||
$field=$langs->transcountrynoentities("ProfId4",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line2.=($line2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof4);
|
||||
$line2.=($line2?" - ":"").$field.": ".$fromcompany->idprof4;
|
||||
}
|
||||
// IntraCommunautary VAT
|
||||
if ($fromcompany->tva_intra != '')
|
||||
{
|
||||
$line2.=($line2?" - ":"").$langs->transnoentities("VATIntraShort").": ".$langs->convToOutputCharset($fromcompany->tva_intra);
|
||||
$line2.=($line2?" - ":"").$langs->transnoentities("VATIntraShort").": ".$fromcompany->tva_intra;
|
||||
}
|
||||
|
||||
print '<br><br><hr>'."\n";
|
||||
|
||||
@ -86,7 +86,7 @@ function html_print_paypal_footer($fromcompany,$langs)
|
||||
$line1="";
|
||||
if ($fromcompany->forme_juridique_code)
|
||||
{
|
||||
$line1.=($line1?" - ":"").$langs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code));
|
||||
$line1.=($line1?" - ":"").getFormeJuridiqueLabel($fromcompany->forme_juridique_code);
|
||||
}
|
||||
// Capital
|
||||
if ($fromcompany->capital)
|
||||
@ -98,14 +98,14 @@ function html_print_paypal_footer($fromcompany,$langs)
|
||||
{
|
||||
$field=$langs->transcountrynoentities("ProfId1",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line1.=($line1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof1);
|
||||
$line1.=($line1?" - ":"").$field.": ".$fromcompany->idprof1;
|
||||
}
|
||||
// Prof Id 2
|
||||
if ($fromcompany->idprof2)
|
||||
{
|
||||
$field=$langs->transcountrynoentities("ProfId2",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line1.=($line1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof2);
|
||||
$line1.=($line1?" - ":"").$field.": ".$fromcompany->idprof2;
|
||||
}
|
||||
|
||||
// Second line of company infos
|
||||
@ -115,19 +115,19 @@ function html_print_paypal_footer($fromcompany,$langs)
|
||||
{
|
||||
$field=$langs->transcountrynoentities("ProfId3",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line2.=($line2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof3);
|
||||
$line2.=($line2?" - ":"").$field.": ".$fromcompany->idprof3;
|
||||
}
|
||||
// Prof Id 4
|
||||
if ($fromcompany->idprof4)
|
||||
{
|
||||
$field=$langs->transcountrynoentities("ProfId4",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line2.=($line2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof4);
|
||||
$line2.=($line2?" - ":"").$field.": ".$fromcompany->idprof4;
|
||||
}
|
||||
// IntraCommunautary VAT
|
||||
if ($fromcompany->tva_intra != '')
|
||||
{
|
||||
$line2.=($line2?" - ":"").$langs->transnoentities("VATIntraShort").": ".$langs->convToOutputCharset($fromcompany->tva_intra);
|
||||
$line2.=($line2?" - ":"").$langs->transnoentities("VATIntraShort").": ".$fromcompany->tva_intra;
|
||||
}
|
||||
|
||||
print '<br><br><hr>'."\n";
|
||||
@ -156,7 +156,7 @@ function paypaladmin_prepare_head()
|
||||
$h++;
|
||||
|
||||
$object=(object) array();
|
||||
|
||||
|
||||
// Show more tabs from modules
|
||||
// Entries must be declared in modules descriptor with line
|
||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||
|
||||
Loading…
Reference in New Issue
Block a user