diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 2352de1e27b..b7ee7f6bb06 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -820,10 +820,12 @@ class Propal extends CommonObject /** * Load an object from its id and create a new one in database - * @param fromid Id of object to clone - * @param invertdetail Reverse sign of amounts for lines - * @param socid Id of thirdparty - * @return int New id of clone + * + * @param int $fromid Id of object to clone + * @param int $invertdetail Reverse sign of amounts for lines + * @param int $socid Id of thirdparty + * @param HookManager $hookmanager Hook manager instance + * @return int New id of clone */ function createFromClone($fromid,$invertdetail=0,$socid=0,$hookmanager=false) { diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index 24ad42c7a78..461dd78bd32 100755 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -1,6 +1,7 @@ [with a *lot* of help!] * @author Laurent Destailleur * @author Regis Houssin @@ -36,19 +28,10 @@ * @license GNU General Public Licence */ -/** - * \file htdocs/core/class/smtps.class.php - * \brief File of class to manage SMTPS email sending - */ - - -// ============================================================= -// ** Class Constants - /** * Version number of Class */ -define('SMTPs_VER', '1.15', false); +define('SMTPs_VER', '1.16', false); /** * SMTPs Success value @@ -60,10 +43,6 @@ define('SMTPs_SUCCEED', true, false); */ define('SMTPs_FAIL', false, false); - -// ============================================================= -// ** Error codes and messages - /** * Improper parameters */ @@ -79,211 +58,77 @@ define('SMTPs_INVALID_PARAMETERS', 50, false); */ class SMTPs { - // ============================================================= - // ** Class Properties - /** - * Property private string $_smtpsHost - * - * @property private string Host Name or IP of SMTP Server to use - * @name $_smtpsHost - * - * Host Name or IP of SMTP Server to use. Default value of 'localhost' - * This can be defined via a INI file or via a setter method - * - * @access private - * @static - * @since 1.0 - * + * Host Name or IP of SMTP Server to use */ var $_smtpsHost = 'localhost'; /** - * Property private int $_smtpsPort - * - * @property private int SMTP Server Port definition. 25 is default value - * @name var_name - * * SMTP Server Port definition. 25 is default value * This can be defined via a INI file or via a setter method - * - * @access private - * @static - * @since 1.0 - * */ var $_smtpsPort = '25'; /** - * Property private string $_smtpsID - * - * @property private string Secure SMTP Server access ID - * @name $_smtpsID - * * Secure SMTP Server access ID * This can be defined via a INI file or via a setter method - * - * @access private - * @static - * @since 1.0 - * */ var $_smtpsID = null; /** - * Property private string var $_smtpsPW - * - * @property private string Secure SMTP Server access Password - * @name var $_smtpsPW - * * Secure SMTP Server access Password * This can be defined via a INI file or via a setter method - * - * @access private - * @static - * @since 1.0 - * */ var $_smtpsPW = null; /** - * Property private string var $_msgFrom - * - * @property private string Who sent the Message - * @name var $_msgFrom - * * Who sent the Message * This can be defined via a INI file or via a setter method - * - * @access private - * @static - * @since 1.0 - * */ var $_msgFrom = null; /** - * Property private string var $_msgReplyTo - * - * @property private string Where are replies and errors to be sent to - * @name var $_msgReplyTo - * * Where are replies and errors to be sent to * This can be defined via a INI file or via a setter method - * - * @access private - * @static - * @since 1.0 - * */ var $_msgReplyTo = null; /** - * Property private array var $_msgRecipients - * - * @property private array Who will the Message be sent to; TO, CC, BCC - * @name var $_msgRecipients - * * Who will the Message be sent to; TO, CC, BCC * Multi-diminsional array containg addresses the message will * be sent TO, CC or BCC - * - * @access private - * @static - * @since 1.0 - * */ var $_msgRecipients = null; /** - * Property private string var $_msgSubject - * - * @property private string Message Subject - * @name var $_msgSubject - * * Message Subject - * - * @access private - * @static - * @since 1.0 - * */ var $_msgSubject = null; /** - * Property private string var $_msgContent - * - * @property private string Message Content - * @name var $_msgContent - * * Message Content - * - * @access private - * @static - * @since 1.0 - * */ var $_msgContent = null; /** - * Property private string var $_msgXheader - * - * @property private array Custom X-Headers - * @name var $_msgXheader - * * Custom X-Headers - * - * @access private - * @static - * @since 1.0 - * */ var $_msgXheader = null; /** - * Property private string var $_smtpsCharSet - * - * @property private string Character set - * @name var $_smtpsCharSet - * * Character set * Defaulted to 'iso-8859-1' - * - * @access private - * @static - * @since 1.0 - * */ var $_smtpsCharSet = 'iso-8859-1'; /** - * Property private int var $_msgSensitivity - * - * @property private string Message Sensitivity - * @name var $_msgSensitivity - * * Message Sensitivity * Defaults to ZERO - None - * - * @access private - * @static - * @since 1.0 - * */ var $_msgSensitivity = 0; /** - * Property private array var $_arySensitivity - * - * @property private array Sensitivity string values - * @name var $_arySensitivity - * * Message Sensitivity - * - * @access private - * @static - * @since 1.0 - * */ var $_arySensitivity = array ( false, 'Personal', @@ -291,33 +136,13 @@ class SMTPs 'Company Confidential' ); /** - * Property private int var $_msgPriority - * - * @property private int Message Priority - * @name var $_msgPriority - * * Message Sensitivity * Defaults to 3 - Normal - * - * @access private - * @static - * @since 1.0 - * */ var $_msgPriority = 3; /** - * Property private array var $_aryPriority - * - * @property private array Priority string values - * @name var $_aryPriority - * * Message Priority - * - * @access private - * @static - * @since 1.0 - * */ var $_aryPriority = array ( 'Bulk', 'Highest', @@ -327,33 +152,13 @@ class SMTPs 'Lowest' ); /** - * Property private string var $_smtpsTransEncodeType - * - * @property private string Character set - * @name var $_smtpsTransEncode - * * Content-Transfer-Encoding * Defaulted to 0 - 7bit - * - * @access private - * @static - * @since 1.15 - * */ var $_smtpsTransEncodeType = 0; /** - * Property private string var $_smtpsTransEncodeTypes - * - * @property private string Character set - * @name var $_smtpsTransEncodeTypes - * * Content-Transfer-Encoding - * - * @access private - * @static - * @since 1.0 - * */ var $_smtpsTransEncodeTypes = array( '7bit', // Simple 7-bit ASCII '8bit', // 8-bit coding with line termination characters @@ -364,160 +169,70 @@ class SMTPs 'uuencode' ); // UUENCODE encoding /** - * Property private string var $_smtpsTransEncode - * - * @property private string Character set - * @name var $_smtpsTransEncode - * * Content-Transfer-Encoding * Defaulted to '7bit' - * - * @access private - * @static - * @since 1.15 - * @deprecated - * */ var $_smtpsTransEncode = '7bit'; /** - * Property private string var $_smtpsBoundary - * - * @property private string Boundary String for MIME seperation - * @name var $_smtpsBoundary - * * Boundary String for MIME seperation - * - * @access private - * @static - * @since 1.0 - * */ var $_smtpsBoundary = null; /** - * Property private int var $_transportType - * - * @property private int Determines the method inwhich the message are to be sent. - * @name var $_transportType - * * Determines the method inwhich the message are to be sent. * - 'sockets' [0] - conect via network to SMTP server - default * - 'pipe [1] - use UNIX path to EXE * - 'phpmail [2] - use the PHP built-in mail function - * * NOTE: Only 'sockets' is implemented - * - * @access private - * @static - * @since 1.8 - * */ var $_transportType = 0; /** - * Property private string var $_mailPath - * - * @property private string Path to the sendmail execuable - * @name var $_mailPath - * * If '$_transportType' is set to '1', then this variable is used * to define the UNIX file system path to the sendmail execuable - * - * @access private - * @static - * @since 1.8 - * */ var $_mailPath = '/usr/lib/sendmail'; /** - * Property private int var $_smtpTimeout - * - * @property private int Sets the SMTP server timeout in seconds. - * @name var $_smtpTimeout - * * Sets the SMTP server timeout in seconds. - * - * @access private - * @static - * @since 1.8 - * */ var $_smtpTimeout = 10; /** - * Property private int var $_smtpMD5 - * - * @property private boolean Determines whether to calculate message MD5 checksum. - * @name var $_smtpMD5 - * * Determines whether to calculate message MD5 checksum. - * - * @access private - * @static - * @since 1.15 - * */ var $_smtpMD5 = false; /** - * Property private array var $_smtpsErrors - * - * @property private array Class error codes and messages - * @name var $_smtpsErrors - * * Class error codes and messages - * - * @access private - * @static - * @since 1.0 - * */ var $_smtpsErrors = null; /** - * Property private boolean var $_log_level - * - * @property private integer Defines Log Level - * @name var $_log_level - * * Defines log level * 0 - no logging * 1 - connectivity logging * 2 - message generation logging * 3 - detail logging - * - * @access private - * @static - * @since 1.15 - * */ var $_log_level = 0; /** - * Property private boolean var $_debug - * - * @property private boolean Place Class in" debug" mode - * @name var $_debug - * * Place Class in" debug" mode - * - * @access private - * @static - * @since 1.8 - * */ var $_debug = false; - // DOL_CHANGE LDR var $log = ''; var $_errorsTo = ''; var $_deliveryReceipt = 0; - function setDeliveryReceipt( $_val = 0 ) + + + + function setDeliveryReceipt($_val = 0) { $this->_deliveryReceipt = $_val; } @@ -527,10 +242,10 @@ class SMTPs return $this->_deliveryReceipt; } - function setErrorsTo ( $_strErrorsTo ) + function setErrorsTo($_strErrorsTo) { if ( $_strErrorsTo ) - $this->_errorsTo = $this->_strip_email ( $_strErrorsTo ); + $this->_errorsTo = $this->_strip_email($_strErrorsTo); } function getErrorsTo ( $_part = true ) @@ -548,7 +263,7 @@ class SMTPs // ============================================================= - function setDebug ( $_vDebug = false ) + function setDebug( $_vDebug = false ) { $this->_debug = $_vDebug; } @@ -556,22 +271,10 @@ class SMTPs // ** Class methods /** - * Method public void buildRCPTlist( void ) - * * build RECIPIENT List, all addresses who will recieve this message - * - * @name buildRCPTlist() - * - * @final - * @access public - * - * @since 1.0 - * + * * @param void * @return void - * - * @TODO - * */ function buildRCPTlist() { @@ -580,33 +283,14 @@ class SMTPs } /** - * Method private bool _server_connect( void ) - * * Attempt a connection to mail server * - * @name _server_connect() - * - * @final - * @access private - * - * @since 1.14 - * * @param void * @return mixed $_retVal Boolean indicating success or failure on connection - * - * @TODO - * Modify method to generate log of Class to Mail Server communication - * */ function _server_connect() { - /** - * Default return value - * - * @var mixed $_retVal Indicates if Object was created or not - * @access private - * @static - */ + // Default return value $_retVal = true; // We have to make sure the HOST given is valid @@ -657,23 +341,10 @@ class SMTPs } /** - * Method private bool _server_authenticate( void ) - * * Attempt mail server authentication for a secure connection * - * @name _server_authenticate() - * - * @final - * @access private - * - * @since 1.14 - * * @param void * @return mixed $_retVal Boolean indicating success or failure of authentication - * - * @TODO - * Modify method to generate log of Class to Mail Server communication - * */ function _server_authenticate() { @@ -706,35 +377,17 @@ class SMTPs } /** - * Method public void sendMsg( void ) - * * Now send the message * - * @name sendMsg() - * - * @final - * @access public - * - * @since 1.0 - * * @param boolean $_bolTestMsg whether to run this method in 'Test' mode. * @param boolean $_bolDebug whether to log all communication between this Class and the Mail Server. * @return mixed void * $_strMsg If this is run in 'Test' mode, the actual message structure will be returned - * - * @TODO - * Modify method to generate log of Class to Mail Server communication - * Impliment use of new parameters - * */ function sendMsg ( $_bolTestMsg = false, $_bolDebug = false ) { /** * Default return value - * - * @var mixed $_retVal Indicates if Object was created or not - * @access private - * @static */ $_retVal = false; @@ -772,7 +425,7 @@ class SMTPs foreach ( $this->get_RCPT_list() as $_address ) { /* - * @TODO + * TODO * After each 'RCPT TO:' is sent, we need to make sure it was kosher, * if not, the whole message will fail * If any email address fails, we will need to RESET the connection, @@ -806,8 +459,6 @@ class SMTPs // ** Basic System configuration /** - * Method public void setConfig( mixed ) - * * setConfig() is used to populate select class properties from either * a user defined INI file or the systems 'php.ini' file * @@ -829,41 +480,20 @@ class SMTPs * second time, with a path to a user INI file for other properties to be * defined. * - * @name setConfig() - * - * @final - * @access public - * - * @since 1.0 - * * @param mixed $_strConfigPath path to config file or VOID * @return void - * */ function setConfig ( $_strConfigPath = null ) { /** - * Default return value - * * Returns constructed SELECT Object string or boolean upon failure * Default value is set at TRUE - * - * @var mixed $_retVal Indicates if Object was created or not - * @access private - * @static */ $_retVal = true; // if we have a path... if ( ! empty ($_strConfigPath) ) { - /* - * @TODO The error supression around the INCLUDE has to be replaced with - * a 'real' file validation sequence. - * If there is anything wrong with the 'code' in the INI file - * the app will fail right here without any indication of the issue. - * - */ // If the path is not valid, this will NOT generate an error, // it will simply return FALSE. if ( ! @include ( $_strConfigPath ) ) @@ -893,31 +523,15 @@ class SMTPs } /** - * Method public void setTransportType( int ) - * * Determines the method inwhich the messages are to be sent. * - 'sockets' [0] - conect via network to SMTP server * - 'pipe [1] - use UNIX path to EXE * - 'phpmail [2] - use the PHP built-in mail function * - * NOTE: Not yet implemented - * - * @name setTransportType() - * - * @uses Class property $_transportType - * @final - * @access public - * - * @since 1.8 - * * @param int $_type Interger value representing Mail Transport Type * @return void - * - * @TODO - * This feature is not yet implemented - * */ - function setTransportType ( $_type = 0 ) + function setTransportType($_type = 0) { if ( ( is_numeric ($_type) ) && ( ( $_type >= 0 ) && ( $_type <= 3 ) ) ) @@ -925,52 +539,27 @@ class SMTPs } /** - * Method public int getTransportType( void ) - * * Return the method inwhich the message is to be sent. * - 'sockets' [0] - conect via network to SMTP server * - 'pipe [1] - use UNIX path to EXE * - 'phpmail [2] - use the PHP built-in mail function * - * NOTE: Not yet implemented - * - * @name getTransportType() - * - * @uses Class property $_transportType - * @final - * @access public - * - * @since 1.8 - * * @param void * @return int $_strHost Host Name or IP of the Mail Server to use - * */ - function getTransportType () + function getTransportType() { return $this->_transportType; } /** - * Method public void setMailPath( string ) - * * Path to the sendmail execuable * - * NOTE: Not yet implemented - * - * @name setMailPath() - * - * @uses Class property $_mailPath - * @final - * @access public - * - * @since 1.8 - * * @param string $_path Path to the sendmail execuable * @return void * */ - function setMailPath ( $_path ) + function setMailPath($_path) { // This feature is not yet implemented return true; @@ -980,24 +569,12 @@ class SMTPs } /** - * Method public void setHost( string ) - * * Defines the Host Name or IP of the Mail Server to use. * This is defaulted to 'localhost' - * * This is used only with 'socket' based mail transmission * - * @name setHost() - * - * @uses Class property $_smtpsHost - * @final - * @access public - * - * @since 1.0 - * * @param string $_strHost Host Name or IP of the Mail Server to use * @return void - * */ function setHost ( $_strHost ) { @@ -1006,23 +583,11 @@ class SMTPs } /** - * Method public string getHost( void ) - * * Retrieves the Host Name or IP of the Mail Server to use - * * This is used only with 'socket' based mail transmission * - * @name getHost() - * - * @uses Class property $_smtpsHost - * @final - * @access public - * - * @since 1.0 - * * @param void * @return string $_strHost Host Name or IP of the Mail Server to use - * */ function getHost () { @@ -1030,24 +595,12 @@ class SMTPs } /** - * Method public void setPort( int ) - * * Defines the Port Number of the Mail Server to use * This is defaulted to '25' - * * This is used only with 'socket' based mail transmission * - * @name setPort() - * - * @uses Class property $_smtpsPort - * @final - * @access public - * - * @since 1.0 - * * @param int $_smtpsPort Port Number of the Mail Server to use * @return void - * */ function setPort ( $_intPort ) { @@ -1057,23 +610,11 @@ class SMTPs } /** - * Method public string getPort( void ) - * * Retrieves the Port Number of the Mail Server to use - * * This is used only with 'socket' based mail transmission * - * @name getPort() - * - * @uses Class property $_smtpsPort - * @final - * @access public - * - * @since 1.0 - * * @param void * @return string $_smtpsPort Port Number of the Mail Server to use - * */ function getPort () { @@ -1081,21 +622,10 @@ class SMTPs } /** - * Method public void setID( string ) - * * User Name for authentication on Mail Server * - * @name setID() - * - * @uses Class property $_smtpsID - * @final - * @access public - * - * @since 1.0 - * * @param string $_strID User Name for authentication on Mail Server * @return void - * */ function setID ( $_strID ) { @@ -1103,21 +633,10 @@ class SMTPs } /** - * Method public string getID( void ) - * * Retrieves the User Name for authentication on Mail Server * - * @name getID() - * - * @uses Class property $_smtpsPort - * @final - * @access public - * - * @since 1.0 - * * @param void * @return string _smtpsID User Name for authentication on Mail Server - * */ function getID () { @@ -1125,21 +644,10 @@ class SMTPs } /** - * Method public void setPW( string ) - * * User Password for authentication on Mail Server * - * @name setPW() - * - * @uses Class property $_smtpsPW - * @final - * @access public - * - * @since 1.0 - * * @param string $_strPW User Password for authentication on Mail Server * @return void - * */ function setPW ( $_strPW ) { @@ -1147,21 +655,10 @@ class SMTPs } /** - * Method public string getPW( void ) - * * Retrieves the User Password for authentication on Mail Server * - * @name getPW() - * - * @uses Class property $_smtpsPW - * @final - * @access public - * - * @since 1.0 - * * @param void * @return string $_smtpsPW User Password for authentication on Mail Server - * */ function getPW () { @@ -1169,22 +666,11 @@ class SMTPs } /** - * Method public void setCharSet( string ) - * * Character set used for current message * Character set is defaulted to 'iso-8859-1'; * - * @name setCharSet() - * - * @uses Class property $_smtpsCharSet - * @final - * @access public - * - * @since 1.0 - * * @param string $_strCharSet Character set used for current message * @return void - * */ function setCharSet ( $_strCharSet ) { @@ -1193,21 +679,10 @@ class SMTPs } /** - * Method public string getCharSet( void ) - * * Retrieves the Character set used for current message * - * @name getCharSet() - * - * @uses Class property $_smtpsCharSet - * @final - * @access public - * - * @since 1.0 - * * @param void * @return string $_smtpsCharSet Character set used for current message - * */ function getCharSet () { @@ -1215,11 +690,8 @@ class SMTPs } /** - * Method public void setTransEncode( string ) - * * Content-Transfer-Encoding, Defaulted to '7bit' * This can be changed for 2byte characers sets - * * Known Encode Types * - 7bit Simple 7-bit ASCII * - 8bit 8-bit coding with line termination characters @@ -1229,18 +701,8 @@ class SMTPs * - quoted-printable Mostly 7-bit, with 8-bit characters encoded as "=HH" * - uuencode UUENCODE encoding * - * @name setTransEncode() - * - * @uses Class property $_smtpsTransEncode - * @final - * @access public - * - * @since 1.15 - * @deprecated - * * @param string $_strTransEncode Content-Transfer-Encoding * @return void - * */ function setTransEncode ( $_strTransEncode ) { @@ -1249,22 +711,10 @@ class SMTPs } /** - * Method public string getTransEncode( void ) - * * Retrieves the Content-Transfer-Encoding * - * @name getTransEncode() - * - * @uses Class property $_smtpsCharSet - * @final - * @access public - * - * @since 1.15 - * @deprecated - * * @param void * @return string $_smtpsTransEncode Content-Transfer-Encoding - * */ function getTransEncode () { @@ -1272,11 +722,8 @@ class SMTPs } /** - * Method public void setTransEncodeType( int ) - * * Content-Transfer-Encoding, Defaulted to '0' [ZERO] * This can be changed for 2byte characers sets - * * Known Encode Types * - [0] 7bit Simple 7-bit ASCII * - [1] 8bit 8-bit coding with line termination characters @@ -1286,44 +733,24 @@ class SMTPs * - [5] quoted-printable Mostly 7-bit, with 8-bit characters encoded as "=HH" * - [6] uuencode UUENCODE encoding * - * @name setTransEncodeType() - * - * @uses Class property $_smtpsTransEncodeType - * @uses Class property $_smtpsTransEncodeTypes - * @final - * @access public - * - * @since 1.15 - * * @param string $_strTransEncodeType Content-Transfer-Encoding * @return void * */ - function setTransEncodeType ( $_strTransEncodeType ) + function setTransEncodeType($_strTransEncodeType) { - if ( array_search ( $_strTransEncodeType, $this->_smtpsTransEncodeTypes ) ) + if (array_search($_strTransEncodeType, $this->_smtpsTransEncodeTypes)) $this->_smtpsTransEncodeType = $_strTransEncodeType; } /** - * Method public string getTransEncodeType( void ) - * * Retrieves the Content-Transfer-Encoding * - * @name getTransEncodeType() - * - * @uses Class property $_smtpsTransEncodeType - * @uses Class property $_smtpsTransEncodeTypes - * @final - * @access public - * - * @since 1.0 - * * @param void * @return string $_smtpsTransEncode Content-Transfer-Encoding * */ - function getTransEncodeType () + function getTransEncodeType() { return $this->_smtpsTransEncodeTypes[$this->_smtpsTransEncodeType]; } @@ -1332,21 +759,10 @@ class SMTPs // ** Message Construction /** - * Method public void setFrom( string ) - * * FROM Address from which mail will be sent * - * @name setFrom() - * - * @uses Class property $_msgFrom - * @final - * @access public - * - * @since 1.0 - * * @param string $_msgFrom Address from which mail will be sent * @return void - * */ function setFrom ( $_strFrom ) { @@ -1355,21 +771,10 @@ class SMTPs } /** - * Method public string getFrom( void ) - * * Retrieves the Address from which mail will be sent * - * @name getFrom() - * - * @uses Class property $_msgFrom - * @final - * @access public - * - * @since 1.0 - * * @param boolean $_strip To "strip" 'Real name' from address * @return string $_msgFrom Address from which mail will be sent - * */ function getFrom ( $_part = true ) { @@ -1385,22 +790,12 @@ class SMTPs /** - * Method private array _buildAddrList( void ) - * * Inserts given addresses into structured format. * This method takes a list of given addresses, via an array * or a COMMA delimted string, and inserts them into a highly * structured array. This array is designed to remove duplicate * addresses and to sort them by Domain. * - * @name _buildAddrList() - * - * @uses Class property $_msgRecipients - * @final - * @access private - * - * @since 1.0 - * * @param string $_type TO, CC, or BCC lists to add addrresses into * @param mixed $_addrList Array or COMMA delimited string of addresses * @return void @@ -1463,15 +858,11 @@ class SMTPs } /** - * Method private array _strip_email( string ) - * * Returns an array of the various parts of an email address - * * This assumes a well formed address: * - "Real name" * - "Real Name" is optional * - if "Real Name" does not exist, the angle brackets are optional - * * This will split an email address into 4 or 5 parts. * - $_aryEmail[org] = orignal string * - $_aryEmail[real] = "real name" - if there is one @@ -1479,18 +870,10 @@ class SMTPs * - $_aryEmail[host] = "domain.tld" * - $_aryEmail[user] = "userName" * - * @name _strip_email() - * - * @final - * @access private - * - * @since 1.0 - * * @param void * @return array $_aryEmail An array of the various parts of an email address - * */ - function _strip_email ( $_strAddr ) + function _strip_email($_strAddr) { // Keep the orginal $_aryEmail['org'] = $_strAddr; @@ -1526,40 +909,17 @@ class SMTPs } /** - * Method public array get_RCPT_list( void ) - * * Returns an array of bares addresses for use with 'RCPT TO:' - * * This is a "build as you go" method. Each time this method is called * the underlaying array is destroyed and reconstructed. * - * @name get_RCPT_list() - * - * @uses Class property $_msgRecipients - * @final - * @access public - * - * @since 1.0 - * * @param void * @return array $_RCPT_list Returns an array of bares addresses - * */ function get_RCPT_list() { /** - * Variable local array $_RCPT_list - * * An array of bares addresses for use with 'RCPT TO:' - * - * Reset this array each time this method is called. - * - * @var array $_RCPT_list 'RCPT TO:' address list - * @access private - * @static - * @final - * - * @since 1.8 */ unset ( $_RCPT_list ); @@ -1580,21 +940,10 @@ class SMTPs } /** - * Method public array get_email_list( string ) - * * Returns an array of addresses for a specific type; TO, CC or BCC * - * @name get_email_list() - * - * @uses Class property $_msgRecipients - * @final - * @access public - * - * @since 1.0 - * * @param mixed $_which Which collection of adresses to return * @return array $_RCPT_list Array of emaill address - * */ function get_email_list( $_which = null ) { @@ -1642,21 +991,10 @@ class SMTPs } /** - * Method public void setTO( string ) - * * TO Address[es] inwhich to send mail to * - * @name setTO() - * - * @uses Class property $_msgRecipients - * @final - * @access public - * - * @since 1.0 - * * @param mixed $_addrTo TO Address[es] inwhich to send mail to * @return void - * */ function setTO ( $_addrTo ) { @@ -1665,21 +1003,10 @@ class SMTPs } /** - * Method public string getTo( void ) - * * Retrieves the TO Address[es] inwhich to send mail to * - * @name getTo() - * - * @uses Class property $_msgRecipients - * @final - * @access public - * - * @since 1.0 - * * @param void * @return string $_msgRecipients TO Address[es] inwhich to send mail to - * */ function getTo () { @@ -1687,21 +1014,10 @@ class SMTPs } /** - * Method public void setCC( string ) - * * CC Address[es] inwhich to send mail to * - * @name setCC() - * - * @uses Class property $_msgRecipients - * @final - * @access public - * - * @since 1.0 - * * @param string $_msgRecipients CC Address[es] inwhich to send mail to * @return void - * */ function setCC ( $_strCC ) { @@ -1710,21 +1026,10 @@ class SMTPs } /** - * Method public string getCC( void ) - * * Retrieves the CC Address[es] inwhich to send mail to * - * @name getCC() - * - * @uses Class property $_msgRecipients - * @final - * @access public - * - * @since 1.0 - * * @param void * @return string $_msgRecipients CC Address[es] inwhich to send mail to - * */ function getCC () { @@ -1732,21 +1037,10 @@ class SMTPs } /** - * Method public void setBCC( string ) - * * BCC Address[es] inwhich to send mail to * - * @name setBCC() - * - * @uses Class property $_msgRecipients - * @final - * @access public - * - * @since 1.0 - * * @param string $_msgRecipients BCC Address[es] inwhich to send mail to * @return void - * */ function setBCC ( $_strBCC ) { @@ -1755,21 +1049,10 @@ class SMTPs } /** - * Method public string getBCC( void ) - * * Retrieves the BCC Address[es] inwhich to send mail to * - * @name getBCC() - * - * @uses Class property $_msgRecipients - * @final - * @access public - * - * @since 1.0 - * * @param void * @return string $_msgRecipients BCC Address[es] inwhich to send mail to - * */ function getBCC () { @@ -1777,21 +1060,10 @@ class SMTPs } /** - * Method public void setSubject( string ) - * * Message Subject * - * @name setSubject() - * - * @uses Class property $_msgSubject - * @final - * @access public - * - * @since 1.0 - * * @param string $_msgSubject Message Subject * @return void - * */ function setSubject ( $_strSubject = '' ) { @@ -1800,21 +1072,10 @@ class SMTPs } /** - * Method public string getSubject( void ) - * * Retrieves the Message Subject * - * @name getSubject() - * - * @uses Class property $_msgSubject - * @final - * @access public - * - * @since 1.0 - * * @param void * @return string $_msgSubject Message Subject - * */ function getSubject () { @@ -1822,28 +1083,10 @@ class SMTPs } /** - * Method public string getHeader( void ) - * * Constructes and returns message header * - * @name getHeader() - * - * @uses Class method getFrom() The FROM address - * @uses Class method getTO() The TO address[es] - * @uses Class method getCC() The CC address[es] - * @uses Class method getBCC() The BCC address[es] - * @uses Class method getSubject() The Message Subject - * @uses Class method getSensitivity() Message Sensitivity - * @uses Class method getPriority() Message Priority - * - * @final - * @access public - * - * @since 1.0 - * * @param void * @return string Complete message header - * */ function getHeader() { @@ -1888,21 +1131,10 @@ class SMTPs } /** - * Method public void setBodyContent( string, string ) - * * Message Content * - * @name setBodyContent() - * - * @uses Class property $_msgContent - * @final - * @access public - * - * @since 1.0 - * * @param string $_msgContent Message Content * @return void - * */ function setBodyContent ( $strContent, $strType = 'plain' ) { @@ -1929,21 +1161,10 @@ class SMTPs } /** - * Method public string getBodyContent( void ) - * * Retrieves the Message Content * - * @name getBodyContent() - * - * @uses Class property $_msgContent - * @final - * @access public - * - * @since 1.0 - * * @param void * @return string $_msgContent Message Content - * */ function getBodyContent () { @@ -1986,7 +1207,7 @@ class SMTPs // NOTE: This was 'multipart/alternative', but Windows based // mail servers have issues with this. /* - * @TODO Investigate "nested" boundary message parts + * TODO Investigate "nested" boundary message parts */ //$content = 'Content-Type: multipart/related; boundary="' . $this->_getBoundary() . '"' . "\r\n"; $content = 'Content-Type: multipart/mixed; boundary="' . $this->_getBoundary() . '"' . "\r\n"; @@ -2077,23 +1298,13 @@ class SMTPs } /** - * Method public void setAttachment( string, string, string ) - * * File attachments are added to the content array as sub-arrays, * allowing for multiple attachments for each outbound email * - * @name setBodyContent() - * - * @final - * @access public - * - * @since 1.0 - * * @param string $strContent File data to attach to message * @param string $strFileName File Name to give to attachment * @param string $strMimeType File Mime Type of attachment * @return void - * */ function setAttachment($strContent, $strFileName = 'unknown', $strMimeType = 'unknown') { @@ -2114,8 +1325,6 @@ class SMTPs // DOL_CHANGE LDR /** - * Method public void setImageInline( string ) - * * Image attachments are added to the content array as sub-arrays, * allowing for multiple images for each outbound email * @@ -2124,7 +1333,6 @@ class SMTPs * @param string $strMimeType Image Mime Type of attachment * @param string $strImageCid CID * @return void - * */ function setImageInline($strContent, $strImageName = 'unknown', $strMimeType = 'unknown', $strImageCid = 'unknown') { @@ -2143,8 +1351,6 @@ class SMTPs /** - * Method public void setSensitivity( string ) - * * Message Content Sensitivity * Message Sensitivity values: * - [0] None - default @@ -2152,17 +1358,8 @@ class SMTPs * - [2] Private * - [3] Company Confidential * - * @name setSensitivity() - * - * @uses Class property $_msgSensitivity - * @final - * @access public - * - * @since 1.0 - * * @param string $_value Message Sensitivity * @return void - * */ function setSensitivity($_value = 0) { @@ -2172,8 +1369,6 @@ class SMTPs } /** - * Method public string getSensitivity( void ) - * * Returns Message Content Sensitivity string * Message Sensitivity values: * - [0] None - default @@ -2181,18 +1376,8 @@ class SMTPs * - [2] Private * - [3] Company Confidential * - * @name getSensitivity() - * - * @uses Class property $_msgSensitivity - * @uses Class property $_arySensitivity - * @final - * @access public - * - * @since 1.0 - * * @param string $_msgSensitivity Message Sensitivity * @return void - * */ function getSensitivity() { @@ -2200,8 +1385,6 @@ class SMTPs } /** - * Method public void setPriority( int ) - * * Message Content Priority * Message Priority values: * - [0] 'Bulk' @@ -2211,17 +1394,8 @@ class SMTPs * - [4] 'Low' * - [5] 'Lowest' * - * @name setPriority() - * - * @uses Class property $_msgPriority - * @final - * @access public - * - * @since 1.0 - * * @param string $_value Message Priority * @return void - * */ function setPriority ( $_value = 3 ) { @@ -2231,8 +1405,6 @@ class SMTPs } /** - * Method public string getPriority( void ) - * * Message Content Priority * Message Priority values: * - [0] 'Bulk' @@ -2242,18 +1414,8 @@ class SMTPs * - [4] 'Low' * - [5] 'Lowest' * - * @name getPriority() - * - * @uses Class property $_msgPriority - * @uses Class property $_aryPriority - * @final - * @access public - * - * @since 1.0 - * * @param string $_value Message Priority * @return void - * */ function getPriority() { @@ -2263,21 +1425,10 @@ class SMTPs } /** - * Method public void setMD5flag( boolean ) - * * Set flag which determines whether to calculate message MD5 checksum. * - * @name setMD5flag() - * - * @uses Class property $_smtpMD5 - * @final - * @access public - * - * @since 1.14 - * * @param string $_value Message Priority * @return void - * */ function setMD5flag ( $_flag = false ) { @@ -2285,21 +1436,10 @@ class SMTPs } /** - * Method public boolean getMD5flag( void ) - * * Gets flag which determines whether to calculate message MD5 checksum. * - * @name getMD5flag() - * - * @uses Class property $_smtpMD5 - * @final - * @access public - * - * @since 1.14 - * * @param void * @return string $_value Message Priority - * */ function getMD5flag ( ) { @@ -2307,23 +1447,12 @@ class SMTPs } /** - * Method public void setXheader( string ) - * * Message X-Header Content * This is a simple "insert". Whatever is given will be placed * "as is" into the Xheader array. * - * @name setXheader() - * - * @uses Class property $_msgXheader - * @final - * @access public - * - * @since 1.0 - * * @param string $strXdata Message X-Header Content * @return void - * */ function setXheader ( $strXdata ) { @@ -2332,21 +1461,10 @@ class SMTPs } /** - * Method public string getXheader( void ) - * * Retrieves the Message X-Header Content * - * @name getXheader() - * - * @uses Class property $_msgContent - * @final - * @access public - * - * @since 1.0 - * * @param void * @return string $_msgContent Message X-Header Content - * */ function getXheader () { @@ -2354,21 +1472,10 @@ class SMTPs } /** - * Method private void _setBoundary( string ) - * * Generates Random string for MIME message Boundary * - * @name _setBoundary() - * - * @uses Class property $_smtpsBoundary - * @final - * @access private - * - * @since 1.0 - * * @param void * @return void - * */ function _setBoundary() { @@ -2376,21 +1483,10 @@ class SMTPs } /** - * Method private string _getBoundary( void ) - * * Retrieves the MIME message Boundary * - * @name _getBoundary() - * - * @uses Class property $_smtpsBoundary - * @final - * @access private - * - * @since 1.0 - * * @param void * @return string $_smtpsBoundary MIME message Boundary - * */ function _getBoundary() { @@ -2407,14 +1503,8 @@ class SMTPs function server_parse($socket, $response) { /** - * Default return value - * * Returns constructed SELECT Object string or boolean upon failure * Default value is set at TRUE - * - * @var mixed $_retVal Indicates if Object was created or not - * @access private - * @static */ $_retVal = true; @@ -2452,22 +1542,11 @@ class SMTPs // ** Error handling methods /** - * Method private void _setErr( int code, string message ) - * * Defines errors codes and messages for Class * - * @name _setErr() - * - * @uses Class property $_smtpsErrors - * @final - * @access private - * - * @since 1.8 - * * @param int $_errNum Error Code Number * @param string $_errMsg Error Message * @return void - * */ function _setErr ( $_errNum, $_errMsg ) { @@ -2476,21 +1555,10 @@ class SMTPs } /** - * Method private string getErrors ( void ) - * * Returns errors codes and messages for Class * - * @name _setErr() - * - * @uses Class property $_smtpsErrors - * @final - * @access private - * - * @since 1.8 - * * @param void * @return string $_errMsg Error Message - * */ function getErrors() { @@ -2513,59 +1581,49 @@ class SMTPs // ** CSV Version Control Info /** - * $Log: smtps.class.php,v $ - * Revision 1.3 2011/09/12 07:49:59 eldy + * Revision 2011/09/12 07:49:59 eldy * Doxygen * - * Revision 1.2 2011/09/06 06:53:53 hregis + * Revision 2011/09/06 06:53:53 hregis * Fix: use dol_hash instead md5 php function * - * Revision 1.1 2011/09/03 00:14:27 eldy + * Revision 2011/09/03 00:14:27 eldy * Doxygen * - * Revision 1.4 2011/08/28 14:24:23 eldy + * Revision 2011/08/28 14:24:23 eldy * Doxygen * - * Revision 1.3 2011/08/27 19:15:41 hregis - * Fix: remove obsolete tags - * - * Revision 1.2 2011/08/26 23:40:48 eldy - * Qual: vcard is not really an external project but now a specific dolibarr class file, so i moved it into core/class - * - * Revision 1.1 2011/08/26 23:19:54 eldy - * Qual: smtps is not really an external project but now a specific dolibarr class file, so i moved it into core/class - * - * Revision 1.15 2011/07/12 22:19:02 eldy + * Revision 2011/07/12 22:19:02 eldy * Fix: Attachment fails if content was empty * - * Revision 1.14 2011/06/20 23:17:50 hregis + * Revision 2011/06/20 23:17:50 hregis * Fix: use best structure of mail * - * Revision 1.13 2010/04/13 20:58:37 eldy + * Revision 2010/04/13 20:58:37 eldy * Fix: Can provide ip address on smtps. Better error reporting. * - * Revision 1.12 2010/04/13 20:30:25 eldy + * Revision 2010/04/13 20:30:25 eldy * Fix: Can provide ip address on smtps. Better error reporting. * - * Revision 1.11 2010/01/12 13:02:07 hregis + * Revision 2010/01/12 13:02:07 hregis * Fix: missing attach-files * - * Revision 1.10 2009/11/01 14:16:30 eldy + * Revision 2009/11/01 14:16:30 eldy * Fix: Sending mail with SMTPS was not working. * - * Revision 1.9 2009/10/20 13:14:47 hregis + * Revision 2009/10/20 13:14:47 hregis * Fix: function "split" is deprecated since php 5.3.0 * - * Revision 1.8 2009/05/13 19:10:07 eldy + * Revision 2009/05/13 19:10:07 eldy * New: Can use inline images.Everything seems to work with thunderbird and webmail gmail. New to be tested on other mail browsers. * - * Revision 1.7 2009/05/13 14:49:30 eldy + * Revision 2009/05/13 14:49:30 eldy * Fix: Make code so much simpler and solve a lot of problem with new version. * - * Revision 1.2 2009/02/09 00:04:35 eldy + * Revision 2009/02/09 00:04:35 eldy * Added support for SMTPS protocol * - * Revision 1.1 2008/04/16 23:11:45 eldy + * Revision 2008/04/16 23:11:45 eldy * New: Add action "Test server connectivity" * * Revision 1.18 2007/01/12 22:17:08 ongardie @@ -2606,7 +1664,7 @@ class SMTPs * Revision 1.12 2005/08/20 12:04:30 braverock * - remove potentially binary characters from Message-ID * - add getHost to get the hostname of the mailserver - * - @todo add username to Message-ID header + * - add username to Message-ID header * * Revision 1.11 2005/08/20 11:49:48 braverock * - fix typos in boundary diff --git a/htdocs/includes/modules/member/labels/modules_labels.php b/htdocs/includes/modules/member/labels/modules_labels.php index 144619964ec..1bd63add071 100644 --- a/htdocs/includes/modules/member/labels/modules_labels.php +++ b/htdocs/includes/modules/member/labels/modules_labels.php @@ -61,11 +61,12 @@ class ModelePDFLabels /** * Create a document onto disk accordign to template module * - * @param DoliDB $db Database handler - * @param array $arrayofmembers Array of members - * @param string $modele Force le modele a utiliser ('' to not force) - * @param Translate $outputlangs Objet lang a utiliser pour traduction - * @return int <0 if KO, >0 if OK + * @param DoliDB $db objet base de donnee + * @param int $id id de la facture a creer + * @param string $message message + * @param string $modele force le modele a utiliser ('' to not force) + * @param string $outputlangs objet lang a utiliser pour traduction + * @return int <0 if KO, >0 if OK */ function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs) { diff --git a/htdocs/includes/modules/supplier_invoice/modules_facturefournisseur.php b/htdocs/includes/modules/supplier_invoice/modules_facturefournisseur.php index 387d4b3bb05..4db49f84484 100755 --- a/htdocs/includes/modules/supplier_invoice/modules_facturefournisseur.php +++ b/htdocs/includes/modules/supplier_invoice/modules_facturefournisseur.php @@ -60,6 +60,7 @@ abstract class ModelePDFSuppliersInvoices extends CommonDocGenerator * @param Object $object object supplier invoice * @param string $model force le modele a utiliser ('' to not force) * @param Translate $outputlangs objet lang a utiliser pour traduction + * @param HookManager $hookmanager Hook manager instance * @return int 0 if KO, 1 if OK */ function supplier_invoice_pdf_create($db, $object, $model, $outputlangs) diff --git a/htdocs/includes/modules/supplier_order/modules_commandefournisseur.php b/htdocs/includes/modules/supplier_order/modules_commandefournisseur.php index e54e109193a..37bdfb7d965 100644 --- a/htdocs/includes/modules/supplier_order/modules_commandefournisseur.php +++ b/htdocs/includes/modules/supplier_order/modules_commandefournisseur.php @@ -146,6 +146,7 @@ class ModeleNumRefSuppliersOrders * @param int $hidedetails Hide details of lines * @param int $hidedesc Hide description * @param int $hideref Hide ref + * @param HookManager $hookmanager Hook manager instance * @return int 0 if KO, 1 if OK */ function supplier_order_pdf_create($db, $object, $model, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) diff --git a/htdocs/lib/pdf.lib.php b/htdocs/lib/pdf.lib.php index 8396d89bb6a..8735706696b 100644 --- a/htdocs/lib/pdf.lib.php +++ b/htdocs/lib/pdf.lib.php @@ -198,7 +198,6 @@ function pdf_format_address($outputlangs,$object) /** * Return a string with full address formated - * * @param outputlangs Output langs object * @param sourcecompany Source company object * @param targetcompany Target company object @@ -297,10 +296,9 @@ 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 int $page_height Height of page + * @param pdf Object PDF + * @param outputlang Object lang for output + * @param page_height */ function pdf_pagehead(&$pdf,$outputlangs,$page_height) { @@ -316,11 +314,10 @@ function pdf_pagehead(&$pdf,$outputlangs,$page_height) /** * Add a draft watermark on PDF files - * * @param pdf Object PDF * @param outputlangs Object lang - * @param h Height of PDF - * @param w Width of PDF + * @param height Height of PDF + * @param width Width of PDF * @param unit Unit of height (mmn, pt, ...) * @param text Text to show */ @@ -495,9 +492,8 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0) /** * Show footer of page for PDF generation - * * @param pdf The PDF factory - * @param outputlangs Object lang for output + * @param outputlang Object lang for output * @param paramfreetext Constant name of free text * @param fromcompany Object company * @param marge_basse Margin bottom @@ -692,19 +688,17 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass /** * Output line description into PDF - * - * @param PDF $pdf PDF object - * @param Object $object Object - * @param int $i Current line number - * @param Translate $outputlangs Object lang for output - * @param int $w Width - * @param int $h Height - * @param int $posx Pos x - * @param int $posy Pos y - * @param int $hideref Hide reference - * @param int $hidedesc Hide description - * @param int $issupplierline Is it a line for a supplier object ? - * @param HookManager $hookmanager Instance of HookManager + * @param pdf PDF object + * @param object Object + * @param i Current line number + * @param outputlang Object lang for output + * @param w + * @param h + * @param posx + * @param posy + * @param hideref Hide reference + * @param hidedesc Hide description + * @param issupplierline Is it a line for a supplier object ? */ function pdf_writelinedesc(&$pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy,$hideref=0,$hidedesc=0,$issupplierline=0,$hookmanager=false) { @@ -1193,9 +1187,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..05465a782c3 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) { @@ -86,13 +85,11 @@ function test_sql_and_script_inject($val, $get) if ($get) $sql_inj += preg_match('/"/i', $val); // We refused " in GET parameters value return $sql_inj; } - /** * Security: Return true if OK, false otherwise * * @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 +114,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"])) { @@ -788,17 +784,17 @@ if (! function_exists("llxHeader")) { /** * Show HTML header HTML + BODY + Top menu + left menu + DIV - * - * @param string $head Optionnal head lines - * @param string $title HTML title - * @param string $help_url Url links to help page - * Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage - * For other external page: http://server/url - * @param int $disablejs More content into html header - * @param int $disablehead More content into html header - * @param array $arrayofjs Array of complementary js files - * @param array $arrayofcss Array of complementary css files - * @param string $morequerystring Query string to add to the link "print" to get same parameters (use only if autodetect fails) + * @param head Add optionnal head lines + * @param title Title of web page + * @param help_url Url links to help page + * Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage + * For other external page: http://server/url + * @param target Target to use in menu links + * @param disablejs Do not output links to js (Ex: qd fonction utilisee par sous formulaire Ajax) + * @param disablehead Do not output head section + * @param arrayofjs Array of js files to add in header + * @param arrayofcss Array of css files to add in header + * @param morequerystring Query string to add to the link "print" to get same parameters (use only if autodetect fails) */ function llxHeader($head = '', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='') { @@ -833,7 +829,7 @@ function top_httphead() * @param int $disablehead More content into html header * @param array $arrayofjs Array of complementary js files * @param array $arrayofcss Array of complementary css files - * @return void + * @return none */ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='') { diff --git a/htdocs/product/canvas/product/actions_card_product.class.php b/htdocs/product/canvas/product/actions_card_product.class.php index 970b6fc9c59..5df3cd303c1 100755 --- a/htdocs/product/canvas/product/actions_card_product.class.php +++ b/htdocs/product/canvas/product/actions_card_product.class.php @@ -72,6 +72,17 @@ class ActionsCardProduct extends Product return $langs->trans("Products"); } + /** + * \brief Lecture des donnees dans la base + * \param id Product id + */ + function fetch($id='', $ref='', $action='') + { + $result = parent::fetch($id); + + return $result; + } + /** * Assign custom values for canvas (for example into this->tpl to be used by templates) * diff --git a/htdocs/product/canvas/service/actions_card_service.class.php b/htdocs/product/canvas/service/actions_card_service.class.php index 97970d4e48b..be3a65185f6 100755 --- a/htdocs/product/canvas/service/actions_card_service.class.php +++ b/htdocs/product/canvas/service/actions_card_service.class.php @@ -72,6 +72,17 @@ class ActionsCardService extends Product return $langs->trans("Products"); } + /** + * \brief Lecture des donnees dans la base + * \param id Product id + */ + function fetch($id='', $ref='', $action='') + { + $result = parent::fetch($id); + + return $result; + } + /** * Assign custom values for canvas (for example into this->tpl to be used by templates) * diff --git a/htdocs/societe/canvas/default/actions_card_default.class.php b/htdocs/societe/canvas/default/actions_card_default.class.php index 5c0d7ffcd6a..ed95c25e722 100644 --- a/htdocs/societe/canvas/default/actions_card_default.class.php +++ b/htdocs/societe/canvas/default/actions_card_default.class.php @@ -69,8 +69,7 @@ class ActionsCardDefault extends ActionsCardCommon /** * Execute actions - * - * @param int $socid Id of object (may be empty for creation) + * @param Id of object (may be empty for creation) */ function doActions($socid) { @@ -82,7 +81,7 @@ class ActionsCardDefault extends ActionsCardCommon /** * Assign custom values for canvas (for example into this->tpl to be used by templates) * - * @param string $action Type of action + * @param action Type of action */ function assign_values($action='') { diff --git a/htdocs/societe/canvas/individual/actions_card_individual.class.php b/htdocs/societe/canvas/individual/actions_card_individual.class.php index e9012d4e20d..e1db7a5efef 100644 --- a/htdocs/societe/canvas/individual/actions_card_individual.class.php +++ b/htdocs/societe/canvas/individual/actions_card_individual.class.php @@ -69,8 +69,7 @@ class ActionsCardIndividual extends ActionsCardCommon /** * Execute actions - * - * @param int $socid Id of object (may be empty for creation) + * @param Id of object (may be empty for creation) */ function doActions($socid) { @@ -80,9 +79,9 @@ class ActionsCardIndividual extends ActionsCardCommon } /** - * Assign custom values for canvas (for example into this->tpl to be used by templates) + * Assign custom values for canvas (for example into this->tpl to be used by templates) * - * @param string $action Type of action + * @param action Type of action */ function assign_values($action='') {