Merge pull request #12013 from Ahuahuachi/develop

Translate french documentation
This commit is contained in:
Laurent Destailleur 2019-10-03 15:56:42 +02:00 committed by GitHub
commit fce33240f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,21 +29,21 @@ interface Database
* Format a SQL IF * Format a SQL IF
* *
* @param string $test Test string (example: 'cd.statut=0', 'field IS NULL') * @param string $test Test string (example: 'cd.statut=0', 'field IS NULL')
* @param string $resok resultat si test egal * @param string $resok result if test is equal
* @param string $resko resultat si test non egal * @param string $resko result if test is not equal
* @return string SQL string * @return string SQL string
*/ */
public function ifsql($test, $resok, $resko); public function ifsql($test, $resok, $resko);
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Return datas as an array * Return datas as an array
* *
* @param resource $resultset Resultset of request * @param resource $resultset Resultset of request
* @return array Array * @return array Array
*/ */
public function fetch_row($resultset); public function fetch_row($resultset);
// phpcs:enable // phpcs:enable
/** /**
* Convert (by PHP) a GM Timestamp date into a string date with PHP server TZ to insert into a date field. * Convert (by PHP) a GM Timestamp date into a string date with PHP server TZ to insert into a date field.
@ -52,23 +52,23 @@ interface Database
* @param int $param Date TMS to convert * @param int $param Date TMS to convert
* @return string Date in a string YYYYMMDDHHMMSS * @return string Date in a string YYYYMMDDHHMMSS
*/ */
public function idate($param); public function idate($param);
/** /**
* Return last error code * Return last error code
* *
* @return string lasterrno * @return string lasterrno
*/ */
public function lasterrno(); public function lasterrno();
/** /**
* Start transaction * Start transaction
* *
* @return int 1 if transaction successfuly opened or already opened, 0 if error * @return int 1 if transaction successfuly opened or already opened, 0 if error
*/ */
public function begin(); public function begin();
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Create a new database * Create a new database
* Do not use function xxx_create_db (xxx=mysql, ...) as they are deprecated * Do not use function xxx_create_db (xxx=mysql, ...) as they are deprecated
@ -80,15 +80,15 @@ interface Database
* @param string $owner Username of database owner * @param string $owner Username of database owner
* @return resource resource defined if OK, null if KO * @return resource resource defined if OK, null if KO
*/ */
public function DDLCreateDb($database, $charset = '', $collation = '', $owner = ''); public function DDLCreateDb($database, $charset = '', $collation = '', $owner = '');
// phpcs:enable // phpcs:enable
/** /**
* Return version of database server into an array * Return version of database server into an array
* *
* @return array Version array * @return array Version array
*/ */
public function getVersionArray(); public function getVersionArray();
/** /**
* Convert a SQL request in Mysql syntax to native syntax * Convert a SQL request in Mysql syntax to native syntax
@ -99,25 +99,25 @@ interface Database
*/ */
public static function convertSQLFromMysql($line, $type = 'ddl'); public static function convertSQLFromMysql($line, $type = 'ddl');
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Return the number of lines in the result of a request INSERT, DELETE or UPDATE * Return the number of lines in the result of a request INSERT, DELETE or UPDATE
* *
* @param resource $resultset Curseur de la requete voulue * @param resource $resultset Cursor of the desired request
* @return int Number of lines * @return int Number of lines
* @see num_rows() * @see num_rows()
*/ */
public function affected_rows($resultset); public function affected_rows($resultset);
// phpcs:enable // phpcs:enable
/** /**
* Return description of last error * Return description of last error
* *
* @return string Error text * @return string Error text
*/ */
public function error(); public function error();
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* List tables into a database * List tables into a database
* *
@ -125,15 +125,15 @@ interface Database
* @param string $table Nmae of table filter ('xxx%') * @param string $table Nmae of table filter ('xxx%')
* @return array List of tables in an array * @return array List of tables in an array
*/ */
public function DDLListTables($database, $table = ''); public function DDLListTables($database, $table = '');
// phpcs:enable // phpcs:enable
/** /**
* Return last request executed with query() * Return last request executed with query()
* *
* @return string Last query * @return string Last query
*/ */
public function lastquery(); public function lastquery();
/** /**
* Define sort criteria of request * Define sort criteria of request
@ -142,7 +142,7 @@ interface Database
* @param string $sortorder Sort order * @param string $sortorder Sort order
* @return string String to provide syntax of a sort sql string * @return string String to provide syntax of a sort sql string
*/ */
public function order($sortfield = null, $sortorder = null); public function order($sortfield = null, $sortorder = null);
/** /**
* Decrypt sensitive data in database * Decrypt sensitive data in database
@ -150,24 +150,24 @@ interface Database
* @param string $value Value to decrypt * @param string $value Value to decrypt
* @return string Decrypted value if used * @return string Decrypted value if used
*/ */
public function decrypt($value); public function decrypt($value);
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Return datas as an array * Return datas as an array
* *
* @param resource $resultset Resultset of request * @param resource $resultset Resultset of request
* @return array Array * @return array Array
*/ */
public function fetch_array($resultset); public function fetch_array($resultset);
// phpcs:enable // phpcs:enable
/** /**
* Return last error label * Return last error label
* *
* @return string lasterror * @return string lasterror
*/ */
public function lasterror(); public function lasterror();
/** /**
* Escape a string to insert data * Escape a string to insert data
@ -175,9 +175,9 @@ interface Database
* @param string $stringtoencode String to escape * @param string $stringtoencode String to escape
* @return string String escaped * @return string String escaped
*/ */
public function escape($stringtoencode); public function escape($stringtoencode);
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Get last ID after an insert INSERT * Get last ID after an insert INSERT
* *
@ -185,23 +185,23 @@ interface Database
* @param string $fieldid Field name * @param string $fieldid Field name
* @return int Id of row * @return int Id of row
*/ */
public function last_insert_id($tab, $fieldid = 'rowid'); public function last_insert_id($tab, $fieldid = 'rowid');
// phpcs:enable // phpcs:enable
/** /**
* Return full path of restore program * Return full path of restore program
* *
* @return string Full path of restore program * @return string Full path of restore program
*/ */
public function getPathOfRestore(); public function getPathOfRestore();
/** /**
* Annulation d'une transaction et retour aux anciennes valeurs * Canceling a transaction and returning to old values
* *
* @param string $log Add more log to default log line * @param string $log Add more log to default log line
* @return int 1 si annulation ok ou transaction non ouverte, 0 en cas d'erreur * @return int 1 if cancelation ok or transaction not open, 0 if error
*/ */
public function rollback($log = ''); public function rollback($log = '');
/** /**
* Execute a SQL request and return the resultset * Execute a SQL request and return the resultset
@ -212,7 +212,7 @@ interface Database
* @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...)
* @return resource Resultset of answer * @return resource Resultset of answer
*/ */
public function query($query, $usesavepoint = 0, $type = 'auto'); public function query($query, $usesavepoint = 0, $type = 'auto');
/** /**
* Connexion to server * Connexion to server
@ -225,7 +225,7 @@ interface Database
* @return resource Database access handler * @return resource Database access handler
* @see close() * @see close()
*/ */
public function connect($host, $login, $passwd, $name, $port = 0); public function connect($host, $login, $passwd, $name, $port = 0);
/** /**
* Define limits and offset of request * Define limits and offset of request
@ -234,7 +234,7 @@ interface Database
* @param int $offset Numero of line from where starting fetch * @param int $offset Numero of line from where starting fetch
* @return string String with SQL syntax to add a limit and offset * @return string String with SQL syntax to add a limit and offset
*/ */
public function plimit($limit = 0, $offset = 0); public function plimit($limit = 0, $offset = 0);
/** /**
* Return value of server parameters * Return value of server parameters
@ -242,7 +242,7 @@ interface Database
* @param string $filter Filter list on a particular value * @param string $filter Filter list on a particular value
* @return array Array of key-values (key=>value) * @return array Array of key-values (key=>value)
*/ */
public function getServerParametersValues($filter = ''); public function getServerParametersValues($filter = '');
/** /**
* Return value of server status * Return value of server status
@ -250,16 +250,16 @@ interface Database
* @param string $filter Filter list on a particular value * @param string $filter Filter list on a particular value
* @return array Array of key-values (key=>value) * @return array Array of key-values (key=>value)
*/ */
public function getServerStatusValues($filter = ''); public function getServerStatusValues($filter = '');
/** /**
* Return collation used in database * Return collation used in database
* *
* @return string Collation value * @return string Collation value
*/ */
public function getDefaultCollationDatabase(); public function getDefaultCollationDatabase();
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Return number of lines for result of a SELECT * Return number of lines for result of a SELECT
* *
@ -267,77 +267,77 @@ interface Database
* @return int Nb of lines * @return int Nb of lines
* @see affected_rows() * @see affected_rows()
*/ */
public function num_rows($resultset); public function num_rows($resultset);
// phpcs:enable // phpcs:enable
/** /**
* Return full path of dump program * Return full path of dump program
* *
* @return string Full path of dump program * @return string Full path of dump program
*/ */
public function getPathOfDump(); public function getPathOfDump();
/** /**
* Return version of database client driver * Return version of database client driver
* *
* @return string Version string * @return string Version string
*/ */
public function getDriverInfo(); public function getDriverInfo();
/** /**
* Return generic error code of last operation. * Return generic error code of last operation.
* *
* @return string Error code (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...) * @return string Error code (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...)
*/ */
public function errno(); public function errno();
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Create a table into database * Create a table into database
* *
* @param string $table Name of table * @param string $table Name of table
* @param array $fields Tableau associatif [nom champ][tableau des descriptions] * @param array $fields Associative table [field name][table of descriptions]
* @param string $primary_key Nom du champ qui sera la clef primaire * @param string $primary_key Name of the field that will be the primary key
* @param string $type Type de la table * @param string $type Type of the table
* @param array $unique_keys Tableau associatifs Nom de champs qui seront clef unique => valeur * @param array $unique_keys Associative array Name of fields that will be unique key => value
* @param array $fulltext_keys Tableau des Nom de champs qui seront indexes en fulltext * @param array $fulltext_keys Field name table that will be indexed in fulltext
* @param array $keys Tableau des champs cles noms => valeur * @param array $keys Table of key fields names => value
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
public function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null); public function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null);
// phpcs:enable // phpcs:enable
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Drop a table into database * Drop a table into database
* *
* @param string $table Name of table * @param string $table Name of table
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
public function DDLDropTable($table); public function DDLDropTable($table);
// phpcs:enable // phpcs:enable
/** /**
* Return list of available charset that can be used to store data in database * Return list of available charset that can be used to store data in database
* *
* @return array List of Charset * @return array List of Charset
*/ */
public function getListOfCharacterSet(); public function getListOfCharacterSet();
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Create a new field into table * Create a new field into table
* *
* @param string $table Name of table * @param string $table Name of table
* @param string $field_name Name of field to add * @param string $field_name Name of field to add
* @param string $field_desc Tableau associatif de description du champ a inserer[nom du parametre][valeur du parametre] * @param string $field_desc Associative array of description of the field to insert [parameter name][parameter value]
* @param string $field_position Optionnel ex.: "after champtruc" * @param string $field_position Optional ex .: "after field stuff"
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function DDLAddField($table, $field_name, $field_desc, $field_position = ""); public function DDLAddField($table, $field_name, $field_desc, $field_position = "");
// phpcs:enable // phpcs:enable
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Drop a field from table * Drop a field from table
* *
@ -345,10 +345,10 @@ interface Database
* @param string $field_name Name of field to drop * @param string $field_name Name of field to drop
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function DDLDropField($table, $field_name); public function DDLDropField($table, $field_name);
// phpcs:enable // phpcs:enable
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Update format of a field into a table * Update format of a field into a table
* *
@ -357,58 +357,58 @@ interface Database
* @param string $field_desc Array with description of field format * @param string $field_desc Array with description of field format
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function DDLUpdateField($table, $field_name, $field_desc); public function DDLUpdateField($table, $field_name, $field_desc);
// phpcs:enable // phpcs:enable
/** /**
* Return list of available collation that can be used for database * Return list of available collation that can be used for database
* *
* @return array List of Collation * @return array List of Collation
*/ */
public function getListOfCollation(); public function getListOfCollation();
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Return a pointer of line with description of a table or field * Return a pointer of line with description of a table or field
* *
* @param string $table Name of table * @param string $table Name of table
* @param string $field Optionnel : Name of field if we want description of field * @param string $field Optional : Name of field if we want description of field
* @return resource Resource * @return resource Resource
*/ */
public function DDLDescTable($table, $field = ""); public function DDLDescTable($table, $field = "");
// phpcs:enable // phpcs:enable
/** /**
* Return version of database server * Return version of database server
* *
* @return string Version string * @return string Version string
*/ */
public function getVersion(); public function getVersion();
/** /**
* Return charset used to store data in database * Return charset used to store data in database
* *
* @return string Charset * @return string Charset
*/ */
public function getDefaultCharacterSetDatabase(); public function getDefaultCharacterSetDatabase();
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Create a user and privileges to connect to database (even if database does not exists yet) * Create a user and privileges to connect to database (even if database does not exists yet)
* *
* @param string $dolibarr_main_db_host Ip serveur * @param string $dolibarr_main_db_host Server IP
* @param string $dolibarr_main_db_user Nom user a creer * @param string $dolibarr_main_db_user Username to create
* @param string $dolibarr_main_db_pass Mot de passe user a creer * @param string $dolibarr_main_db_pass User password to create
* @param string $dolibarr_main_db_name Database name where user must be granted * @param string $dolibarr_main_db_name Database name where user must be granted
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
public function DDLCreateUser( public function DDLCreateUser(
$dolibarr_main_db_host, $dolibarr_main_db_host,
$dolibarr_main_db_user, $dolibarr_main_db_user,
$dolibarr_main_db_pass, $dolibarr_main_db_pass,
$dolibarr_main_db_name $dolibarr_main_db_name
); );
// phpcs:enable // phpcs:enable
/** /**
* Convert (by PHP) a PHP server TZ string date into a Timestamps date (GMT if gm=true) * Convert (by PHP) a PHP server TZ string date into a Timestamps date (GMT if gm=true)
@ -419,7 +419,7 @@ interface Database
* @param bool $gm 1=Input informations are GMT values, otherwise local to server TZ * @param bool $gm 1=Input informations are GMT values, otherwise local to server TZ
* @return int|string Date TMS or '' * @return int|string Date TMS or ''
*/ */
public function jdate($string, $gm = false); public function jdate($string, $gm = false);
/** /**
* Encrypt sensitive data in database * Encrypt sensitive data in database
@ -429,7 +429,7 @@ interface Database
* @param int $withQuotes Return string with quotes * @param int $withQuotes Return string with quotes
* @return string XXX(field) or XXX('value') or field or 'value' * @return string XXX(field) or XXX('value') or field or 'value'
*/ */
public function encrypt($fieldorvalue, $withQuotes = 0); public function encrypt($fieldorvalue, $withQuotes = 0);
/** /**
* Validate a database transaction * Validate a database transaction
@ -437,25 +437,25 @@ interface Database
* @param string $log Add more log to default log line * @param string $log Add more log to default log line
* @return int 1 if validation is OK or transaction level no started, 0 if ERROR * @return int 1 if validation is OK or transaction level no started, 0 if ERROR
*/ */
public function commit($log = ''); public function commit($log = '');
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* List information of columns into a table. * List information of columns into a table.
* *
* @param string $table Name of table * @param string $table Name of table
* @return array Array with inforation on table * @return array Array with information on table
*/ */
public function DDLInfoTable($table); public function DDLInfoTable($table);
// phpcs:enable // phpcs:enable
/** /**
* Free last resultset used. * Free last resultset used.
* *
* @param resource $resultset Fre cursor * @param resource $resultset Free cursor
* @return void * @return void
*/ */
public function free($resultset = null); public function free($resultset = null);
/** /**
* Close database connexion * Close database connexion
@ -463,41 +463,41 @@ interface Database
* @return boolean True if disconnect successfull, false otherwise * @return boolean True if disconnect successfull, false otherwise
* @see connect() * @see connect()
*/ */
public function close(); public function close();
/** /**
* Return last query in error * Return last query in error
* *
* @return string lastqueryerror * @return string lastqueryerror
*/ */
public function lastqueryerror(); public function lastqueryerror();
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Return connexion ID * Return connexion ID
* *
* @return string Id connexion * @return string Id connexion
*/ */
public function DDLGetConnectId(); public function DDLGetConnectId();
// phpcs:enable // phpcs:enable
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Renvoie la ligne courante (comme un objet) pour le curseur resultset * Returns the current line (as an object) for the resultset cursor
* *
* @param resource $resultset Curseur de la requete voulue * @param resource $resultset Cursor of the desired request
* @return Object Object result line or false if KO or end of cursor * @return Object Object result line or false if KO or end of cursor
*/ */
public function fetch_object($resultset); public function fetch_object($resultset);
// phpcs:enable // phpcs:enable
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Select a database * Select a database
* *
* @param string $database Name of database * @param string $database Name of database
* @return boolean true if OK, false if KO * @return boolean true if OK, false if KO
*/ */
public function select_db($database); public function select_db($database);
// phpcs:enable // phpcs:enable
} }