diff --git a/.github/scripts/get_changed_php.sh b/.github/scripts/get_changed_php.sh index 192de878900..43d64101c74 100755 --- a/.github/scripts/get_changed_php.sh +++ b/.github/scripts/get_changed_php.sh @@ -1,5 +1,7 @@ #!/bin/bash -# Copyright (C) 2025 MDW +# Copyright (C) 2025-2026 MDW + +# shellcheck disable=2129,2128,2034,2016 set -euo pipefail @@ -41,22 +43,33 @@ repo="${GITHUB_REPOSITORY##*/}" # Extract text after the last '/' page=1 per_page=100 changed_php_files=() +changed_phan_files=() changed_lang_files=() +# Get phan path configuration +phan_directory_list=$(php -r '$config = require("dev/tools/phan/config.php"); echo "^".implode("|",$config["directory_list"]);') +phan_exclude_directory=$(php -r '$config = require("dev/tools/phan/config.php"); echo "^".implode("|",$config["exclude_analysis_directory_list"]);') + +phan_exclude_file_regex=$(php -r '$config = require("dev/tools/phan/config.php"); echo $config["exclude_file_regex"];') +phan_exclude_file_regex=${phan_exclude_file_regex#@} +phan_exclude_file_regex=${phan_exclude_file_regex%@} + # Loop through all pages to gather changed files while true; do response=$(curl -s -H "Authorization: token ${GITHUB_TOKEN}" \ "https://api.github.com/repos/${owner}/${repo}/pulls/${pr_number}/files?per_page=${per_page}&page=${page}") - phan_exclude_file_regex=$(php -r '$config = require("dev/tools/phan/config.php"); echo $config["exclude_file_regex"];') # Filter for files ending with .php and add them to the list - mapfile -t files < <(echo "$response" | jq -r '.[] | select((.filename | test("\\.php$")) and (.filename | test("^dev/") | not)) | .filename' | grep -vP "$phan_exclude_file_regex") + mapfile -t files < <(echo "$response" | jq -r '.[] | select((.filename | test("\\.php$")) and (.filename | test("^dev/") | not)) | .filename') changed_php_files+=("${files[@]}") + mapfile -t files < <(echo "$response" | jq -r '.[] | select((.filename | test("\\.php$")) and (.filename | test("'"$phan_directory_list"'"))) | .filename' | grep -vP "$phan_exclude_file_regex") + changed_phan_files+=("${files[@]}") + mapfile -t files < <(echo "$response" | jq -r '.[] | select(.filename | test("\\.lang$")) | .filename') - changed_lang_files+=("${files[@]}") + changed_lang_files+=("${files[@]}") # Check if we have reached the last page (less than per_page results) count=$(echo "$response" | jq 'length') @@ -69,10 +82,12 @@ done # Build a space-separated string of changed PHP and lang files # This does not cope with files that have spaces. + # But such files do not exist in the project (at least not for the # files we are filtering). all_changed_files=$(IFS=" " ; echo "${changed_php_files[*]}") all_changed_lang=$(IFS=" " ; echo "${changed_lang_files[*]}") +phan_changed_files=$(IFS=" " ; echo "${changed_phan_files[*]}") forbidden_files="" @@ -85,21 +100,31 @@ forbidden_files="" #fi -# Determine changed files flag -if [ -z "$all_changed_files" ]; then +# Determine changed files flags +if [ -z "${all_changed_files}" ]; then any_changed="false" else any_changed="true" fi +if [ -z "${phan_changed_files}" ]; then + phan_changed="false" +else + phan_changed="true" +fi + # Set outputs for GitHub Actions if GITHUB_OUTPUT is available if [ -n "${GITHUB_OUTPUT:-}" ]; then echo "any_changed=${any_changed}" >> "$GITHUB_OUTPUT" + echo "phan_changed=${phan_changed}" >> "$GITHUB_OUTPUT" echo "all_changed_files=${all_changed_files}" >> "$GITHUB_OUTPUT" + echo "phan_changed_files=${phan_changed_files[*]}" >> "$GITHUB_OUTPUT" echo "forbidden_files=${forbidden_files}" >> "$GITHUB_OUTPUT" else # Otherwise, print the outputs echo "any_changed=${any_changed}" + echo "phan_changed=${phan_changed}" + echo "phan_changed_files=${phan_changed_files[*]}" echo "all_changed_files=${all_changed_files}" echo "forbidden_files=${forbidden_files}" fi diff --git a/.github/workflows/phan.yml b/.github/workflows/phan.yml index 3547d3e1df5..9acdbfa17b7 100644 --- a/.github/workflows/phan.yml +++ b/.github/workflows/phan.yml @@ -61,9 +61,10 @@ jobs: # - the merge from branch contains 'phan_full', or, # - there are changes in PHP files. # Note: --output-mode=github does not provide file:line, so using checkstyle and cs2pr - if: ${{ ! cancelled() && (github.ref_name == 'develop' || github.ref_name == 'refs/heads/develop' || endsWith(github.ref_name, '.0') || contains(github.head_ref, 'phan_full') || steps.changed-php.outputs.any_changed == 'true') }} + if: ${{ ! cancelled() && (github.ref_name == 'develop' || github.ref_name == 'refs/heads/develop' || endsWith(github.ref_name, '.0') || contains(github.head_ref, 'phan_full') || steps.changed-php.outputs.phan_changed == 'true') }} env: ALL_CHANGED_FILES: ${{ steps.changed-php.outputs.all_changed_files }} + PHAN_CHANGED_FILES: ${{ steps.changed-php.outputs.phan_changed_files }} # shellcheck disable=2086 FILE_CHANGED_LIST: /tmp/phan-changed.lst run: | @@ -73,7 +74,7 @@ jobs: phan $PHAN_QUICK -k "$PHAN_CONFIG" -B "$PHAN_BASELINE" --analyze-twice --minimum-target-php-version "$PHAN_MIN_PHP" --output-mode=checkstyle -o _phan.xml else echo -n "" > "$FILE_CHANGED_LIST" - for f in $ALL_CHANGED_FILES; do echo "$f" >> "$FILE_CHANGED_LIST"; done + for f in $PHAN_CHANGED_FILES; do echo "$f" >> "$FILE_CHANGED_LIST"; done # Must exclude same files as in phan configuration grep -v -E '^htdocs/(custom/|.*/canvas/.*/tpl/.*.tpl.php|admin/tools/ui/|includes/(nusoap/|restler/|stripe/)|conf/conf.php)$' "$FILE_CHANGED_LIST"> "$FILE_CHANGED_LIST".tmp || true mv "$FILE_CHANGED_LIST".tmp "$FILE_CHANGED_LIST" diff --git a/dev/setup/codesniffer/Sniffs/Dolibarr/CheckIsModEnabledArgumentSniff.php b/dev/setup/codesniffer/Sniffs/Dolibarr/CheckIsModEnabledArgumentSniff.php index 0f5c435a9a8..28d260f60e2 100644 --- a/dev/setup/codesniffer/Sniffs/Dolibarr/CheckIsModEnabledArgumentSniff.php +++ b/dev/setup/codesniffer/Sniffs/Dolibarr/CheckIsModEnabledArgumentSniff.php @@ -1,5 +1,6 @@ + * Copyright (C) 2026 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,7 +26,7 @@ use PHP_CodeSniffer\Files\File; */ class CheckIsModEnabledArgumentSniff implements Sniff { - // Nom de la fonction cible + // Target function name protected $targetFunction = 'ismodenabled'; protected $deprecatedModulesNames = [ @@ -87,7 +88,7 @@ class CheckIsModEnabledArgumentSniff implements Sniff return; } - // check value of argument + // Check argument value $argContent = str_replace(["'", '"'], '', $tokens[$firstArgTokenPtr]['content']); $argCode = $tokens[$firstArgTokenPtr]['code']; diff --git a/dev/setup/codesniffer/Sniffs/Dolibarr/LanguageOfCommentsSniff.php b/dev/setup/codesniffer/Sniffs/Dolibarr/LanguageOfCommentsSniff.php index 2b656adad0b..fc7fb016d6f 100644 --- a/dev/setup/codesniffer/Sniffs/Dolibarr/LanguageOfCommentsSniff.php +++ b/dev/setup/codesniffer/Sniffs/Dolibarr/LanguageOfCommentsSniff.php @@ -1,5 +1,6 @@ + * Copyright (C) 2026 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,6 +15,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + namespace codesniffer\Sniffs\Dolibarr; use PHP_CodeSniffer\Sniffs\Sniff; @@ -108,7 +110,9 @@ class LanguageOfCommentsSniff implements Sniff return; } - if (strpos($content, 'Copyright') === false && preg_match('/[àâäéèêëîïôùûüçœÀÂÄÉÈÊËÎÏÔÙÛÜÇŒ]/u', $content)) { + // Avoid matching special characters directly preceded or followed with []'" + // Avoid matching special characters in a "word/identifier" like string with '_'. + if (strpos($content, 'Copyright') === false && preg_match('/(?\/\'"\[])[àâäéèêëîïôùûüçœÀÂÄÉÈÊËÎÏÔÙÛÜÇŒ]+(?![\'"\[]\/)(?![<>\/\'"\[])(?!\w*_)/u', $content)) { $error = "The comment appears to be in French (accent detected in: '%s'). Please write in English."; $data = [trim($content)]; $phpcsFile->addWarning($error, $stackPtr, 'FrenchDetected', $data); diff --git a/dev/tools/rector/src/Renaming/GlobalToFunction.php b/dev/tools/rector/src/Renaming/GlobalToFunction.php index 16c4b658c29..cabacc2359c 100644 --- a/dev/tools/rector/src/Renaming/GlobalToFunction.php +++ b/dev/tools/rector/src/Renaming/GlobalToFunction.php @@ -1,4 +1,6 @@ + */ namespace Dolibarr\Rector\Renaming; @@ -230,7 +232,7 @@ class GlobalToFunction extends AbstractRector // If a && b and a or b is conf->global, we replace a or/and b if ($node instanceof BooleanAnd) { - // Transformation sur le nœud gauche + // Transformation on the left node $changedone = 0; if ($this->isGlobalVar($node->left)) { $constName = $this->getConstName($node->left); diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index 17e8602a06a..0b01aef5a18 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -27,7 +27,7 @@ /** * \file htdocs/admin/external_rss.php * \ingroup external_rss - * \brief Page to setupe module ExternalRss + * \brief Page to setup the ExternalRss module */ // Load Dolibarr environment @@ -89,7 +89,7 @@ if ($action == 'add' || GETPOST("modify")) { $db->begin(); if (GETPOST("modify")) { - // Supprime boite box_external_rss de definition des boites + // Remove box_external_rss from the definition of boxes /* $sql = "UPDATE ".MAIN_DB_PREFIX."boxes_def"; $sql.= " SET name = '".$db->escape($boxlabel)."'"; $sql.= " WHERE file ='box_external_rss.php' AND note LIKE '".$db->escape(GETPOST("norss"))." %'"; @@ -102,7 +102,7 @@ if ($action == 'add' || GETPOST("modify")) { } */ } else { - // Ajoute boite box_external_rss dans definition des boites + // Add box_external_rss to the definition of boxes $sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes_def (file, note)"; $sql .= " VALUES ('box_external_rss.php', '".$db->escape(GETPOSTINT("norss")." (".GETPOST($external_rss_title)).")')"; if (!$db->query($sql)) { @@ -203,7 +203,7 @@ $linkback = ''; -// Formulaire ajout +// From to add print '
'; print ''; @@ -358,7 +358,7 @@ llxFooter(); $db->close(); /** - * Check if the given RSS feed if inside the list of boxes/widgets + * Check if the given RSS feed is inside the list of boxes/widgets * * @param int $idrss The id of the RSS feed * @param ModeleBoxes[] $boxlist A list with boxes/widgets diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index 4f914758326..766cc7739bc 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -4,7 +4,7 @@ * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2016 Jonathan TISSEAU * Copyright (C) 2024-2025 Frédéric France - * Copyright (C) 2025 MDW + * Copyright (C) 2025-2026 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,7 +22,7 @@ /** * \file htdocs/admin/mails.php - * \brief Page to setup emails sending + * \brief Email setup page */ // Load Dolibarr environment @@ -798,7 +798,7 @@ if ($action == 'edit') { print dol_get_fiche_head(array(), '', '', -1); - // Cree l'objet formulaire mail + // Create the mail form object include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; $formmail = new FormMail($db); $formmail->trackid = (($action == 'testhtml') ? "testhtml" : "test"); diff --git a/htdocs/admin/mails_passwordreset.php b/htdocs/admin/mails_passwordreset.php index 511e64074d5..85105506afb 100644 --- a/htdocs/admin/mails_passwordreset.php +++ b/htdocs/admin/mails_passwordreset.php @@ -4,7 +4,7 @@ * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2016 Jonathan TISSEAU * Copyright (C) 2024-2025 Frédéric France - * Copyright (C) 2025 MDW + * Copyright (C) 2025-2026 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -849,7 +849,7 @@ if ($action == 'edit') { print dol_get_fiche_head(array(), '', '', -1); - // Cree l'objet formulaire mail + // Create the email form object include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; $formmail = new FormMail($db); $formmail->fromname = (GETPOSTISSET('fromname') ? GETPOST('fromname', 'restricthtml') : getDolGlobalString('MAIN_MAIL_EMAIL_FROM')); diff --git a/htdocs/admin/mails_ticket.php b/htdocs/admin/mails_ticket.php index 91e57a9475d..5942f3ef25c 100644 --- a/htdocs/admin/mails_ticket.php +++ b/htdocs/admin/mails_ticket.php @@ -4,7 +4,7 @@ * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2016 Jonathan TISSEAU * Copyright (C) 2024-2025 Frédéric France - * Copyright (C) 2025 MDW + * Copyright (C) 2025-2026 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -794,7 +794,7 @@ if ($action == 'edit') { print dol_get_fiche_head(array(), '', '', -1); - // Cree l'objet formulaire mail + // Create the mail form object include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; $formmail = new FormMail($db); $formmail->fromname = (GETPOSTISSET('fromname') ? GETPOST('fromname', 'restricthtml') : getDolGlobalString('MAIN_MAIL_EMAIL_FROM')); diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index e4c6d73a0a0..e2c5e2da769 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -3,6 +3,7 @@ * Copyright (C) 2009 Regis Houssin * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2020-2025 Frédéric France + * Copyright (C) 2026 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,7 +21,7 @@ /** * \file htdocs/admin/sms.php - * \brief Page to setup emails sending + * \brief Page to set up SMS sending */ // Load Dolibarr environment @@ -267,12 +268,12 @@ if ($action == 'edit') { print ''; - // Affichage formulaire de TEST simple + // Display simple test form if ($action == 'test') { print '
'; print load_fiche_titre($langs->trans("DoTestSend")); - // Cree l'objet formulaire mail + // Create SMS form object include_once DOL_DOCUMENT_ROOT.'/core/class/html.formsms.class.php'; $formsms = new FormSms($db); $formsms->fromtype = 'user'; diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php index f4fa2c44dd8..3a82bd2e795 100644 --- a/htdocs/categories/photos.php +++ b/htdocs/categories/photos.php @@ -149,7 +149,7 @@ if ($object->id) { dol_banner_tab($object, 'label', $linkback, ($user->socid ? 0 : 1), 'label', 'label', $morehtmlref, '&type='.$type, 0, '', '', 1); /* - * Confirmation deletion of picture + * Confirm photo deletion */ if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.urlencode($type).'&file='.urlencode(GETPOST("file")), $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1); @@ -204,15 +204,15 @@ if ($object->id) { print ''."\n"; /* - * Ajouter une photo + * Add a photo */ if ($action == 'ajout_photo' && $user->hasRight('categorie', 'creer') && getDolGlobalString('MAIN_UPLOAD_DOC')) { - // Affiche formulaire upload + // Display upload form $formfile = new FormFile($db); $formfile->form_attach_new_file($_SERVER['PHP_SELF'].'?id='.$object->id.'&type='.$type, $langs->trans("AddPhoto"), 1, 0, $user->hasRight('categorie', 'creer'), 50, $object, '', 0, '', 0); } - // Affiche photos + // Display photos if ($action != 'ajout_photo') { $nbphoto = 0; $nbbyrow = 5; @@ -262,7 +262,7 @@ if ($object->id) { print '
'.$viewfilename; print '
'; - // On propose la generation de la vignette si elle n'existe pas et si la taille est superieure aux limites + // Suggest generation of the thumbnail if it doesn't exist and if the size exceeds the limits if (!$obj['photo_vignette'] && preg_match('/(\.bmp|\.gif|\.jpg|\.jpeg|\.png)$/i', $obj['photo']) && ($object->imgWidth > $maxWidth || $object->imgHeight > $maxHeight)) { print '
'.img_picto($langs->trans('GenerateThumb'), 'refresh').'  '; } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 65f7516e323..f58dbd84533 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1910,7 +1910,7 @@ class Commande extends CommonOrder * @param int|'' $date_end End date of the line * @return void * - * TODO Remplacer les appels a cette fonction par generation object Ligne + * TODO Replace calls to this function by generation of the `Ligne` (line) object */ public function add_product($idproduct, $qty, $remise_percent = 0.0, $date_start = '', $date_end = '') { diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index 293c8c4f668..9bf22d47a3e 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -122,7 +122,7 @@ llxHeader(); $titre = ($year ? $langs->trans("PaymentsReportsForYear", $year) : $langs->trans("PaymentsReports")); print load_fiche_titre($titre, '', 'bill'); -// Formulaire de generation +// Generation form print ''; print ''; print ''; diff --git a/htdocs/compta/paiement_vat.php b/htdocs/compta/paiement_vat.php index 38c4c15a874..b7afbb06ba5 100644 --- a/htdocs/compta/paiement_vat.php +++ b/htdocs/compta/paiement_vat.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2016-2025 Frédéric France * Copyright (C) 2021 Gauthier VERDOL - * Copyright (C) 2024 MDW + * Copyright (C) 2024-2026 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -158,7 +158,7 @@ llxHeader(); $form = new Form($db); -// Formulaire de creation d'un paiement de charge +// Payment charge payment form if ($action == 'create') { $tva = new Tva($db); diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index 0305f4aabd5..1197cf9646f 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -267,8 +267,8 @@ if ($modecompta == 'CREANCES-DETTES') { } } elseif ($modecompta == "RECETTES-DEPENSES") { /* - * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les - * vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin) + * List of payments (old payments are not seen by this query because, on old + * versions, they were not linked via paiement_facture. We add them later) */ $sql = "SELECT date_format(p.datep, '%Y-%m') as dm, sum(pf.amount) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; @@ -733,7 +733,7 @@ print ''; $i++; } - print "Invoice a encaisser : ".price($total_ttc_Rac)."<-- bug ici car n'exclut pas le deja réglé des invoices partiellement réglées"; + print "Invoices to collect: ".price($total_ttc_Rac)."<-- bug here because it does not exclude already paid partially settled invoices"; } $db->free($resql); } @@ -745,7 +745,7 @@ print ''; /* * - * Propales signees, et non facturees + * Signed but not invoiced proposals * */ @@ -782,7 +782,7 @@ print ''; $i++; } - print "Signe et non facture:".price($total_pr)."<-- bug ici, ca devrait exclure le deja facture"; + print "Signe et non facture:".price($total_pr)."<-- g here, it should exclude already invoiced amount>"; } $db->free($resql); } @@ -790,7 +790,7 @@ print ''; { dol_print_error($db); } - print "Total CA previsionnel : ".price($total_CA)."<-- bug ici car bug sur les 2 precedents"; + print "Total CA previsionnel : ".price($total_CA)."<-- bug here because bug on two previous"; } print ""; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 6e7fff8de91..2a205108f84 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6810,7 +6810,7 @@ abstract class CommonObject if (empty($extrafields->attributes[$this->table_element]['type'][$name]) || (!in_array($extrafields->attributes[$this->table_element]['type'][$name], ['separate', 'point', 'multipts', 'linestrg','polygon']))) { $sql .= ", ".$this->db->sanitize($name); } - // use geo sql fonction to read as text + // use geo sql function to read as text if (!empty($extrafields->attributes[$this->table_element]['type'][$name]) && in_array($extrafields->attributes[$this->table_element]['type'][$name], array('point', 'multipts', 'linestrg', 'polygon'))) { // TODO Add an abstraction method in the database driver $sql .= ", ST_AsWKT(".$name.") as ".$this->db->sanitize($name); diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 9b23677050a..525e6e1bbd0 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4878,11 +4878,11 @@ class Form // Example of var_dump $outarray // array(1) {[0]=>array(6) {[key"]=>string(1) "2" ["value"]=>string(3) "ppp" - // ["label"]=>string(76) "ppp (fff2) - ppp - 20,00 Euros/1unité (20,00 Euros/unité)" + // ["label"]=>string(76) "ppp (fff2) - ppp - 20,00 Euros/unit (20,00 Euros/unit)" // ["qty"]=>string(1) "1" ["discount"]=>string(1) "0" ["disabled"]=>bool(false) //} //var_dump($outval); var_dump(utf8_check($outval)); var_dump(json_encode($outval)); - //$outval=array('label'=>'ppp (fff2) - ppp - 20,00 Euros/ Unité (20,00 Euros/unité)'); + //$outval=array('label'=>'ppp (fff2) - ppp - 20,00 Euros/ Unit (20,00 Euros/unit)'); //var_dump($outval); var_dump(utf8_check($outval)); var_dump(json_encode($outval)); $i++; diff --git a/htdocs/core/class/html.formbarcode.class.php b/htdocs/core/class/html.formbarcode.class.php index 9a6023e6a96..4ad533efa6c 100644 --- a/htdocs/core/class/html.formbarcode.class.php +++ b/htdocs/core/class/html.formbarcode.class.php @@ -185,7 +185,7 @@ class FormBarCode * * @param string $page Page * @param int $selected Id condition preselected - * @param string $htmlname Nom du formulaire select + * @param string $htmlname Name of the select form * @return void * @deprecated */ @@ -200,7 +200,7 @@ class FormBarCode * * @param string $page Page * @param int $selected Id condition preselected - * @param string $htmlname Nom du formulaire select + * @param string $htmlname Name of the select form * @return string */ public function formBarcodeType($page, $selected = 0, $htmlname = 'barcodetype_id') diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 9e2c7c2de0f..d3aeb71c8b8 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -153,11 +153,11 @@ class FormCompany extends Form // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Affiche formulaire de selection des modes de reglement + * Displays form for selecting settlement methods * * @param string $page Page * @param int $selected Id or code preselected - * @param string $htmlname Nom du formulaire select + * @param string $htmlname Name of the select form * @param int $empty Add empty value in list * @return void */ @@ -414,10 +414,10 @@ class FormCompany extends Form // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Provides the dropdown of the active regions including the actif country. + * Provides the dropdown of the active regions including the active country. * The key of the list is the code (there may be more than one entry for a * code but in that case the fields country and language are different). - * un code donnee mais dans ce cas, le champ pays et lang differe). + * a given code but in this case, the country and language field differs). * This way the links with the regions are made independent of its name. * * @param string $selected Preselected value @@ -1186,7 +1186,7 @@ class FormCompany extends Form * @param Contact|Client|null $prospectstatic Prospect object * @param int $statusprospect status of prospect * @param int $idprospect id of prospect - * @param 'html'|'js' $mode select if we want activate de html part or js + * @param 'html'|'js' $mode select whether to activate the HTML part or JS * @return void */ public function selectProspectStatus($htmlname, $prospectstatic, $statusprospect, $idprospect, $mode = "html") diff --git a/htdocs/core/class/html.formsms.class.php b/htdocs/core/class/html.formsms.class.php index 15336ce4f70..7d6953902d3 100644 --- a/htdocs/core/class/html.formsms.class.php +++ b/htdocs/core/class/html.formsms.class.php @@ -27,10 +27,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; /** - * Class permettant la generation du formulaire d'envoi de Sms + * Class for generating the SMS sending form * Usage: $formsms = new FormSms($db) * $formsms->proprietes=1 or string or table of values - * $formsms->show_form() affiche le formulaire + * $formsms->show_form() displays the form */ class FormSms { diff --git a/htdocs/core/datepicker.php b/htdocs/core/datepicker.php index 13af821dbc6..db7b77d46dc 100644 --- a/htdocs/core/datepicker.php +++ b/htdocs/core/datepicker.php @@ -3,7 +3,7 @@ * Copyright (C) 2005-2010 Laurent Destailleur * Copyright (C) 2005-2007 Regis Houssin * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024-2026 MDW * Copyright (C) 2024 Frédéric France * * This file is a modified version of datepicker.php from phpBSM to fix some @@ -144,7 +144,7 @@ if ($qualified) { print ''."\n"; /** - * Convert date to timestamp + * Convert date string to a Unix timestamp * * @param string $mysqldate Date YYYMMDD * @return integer Timestamp @@ -160,7 +160,7 @@ function xyzToUnixTimestamp($mysqldate) } /** - * Show box + * Displays the date picker box * * @param string $selectedDate Date YYYYMMDD * @param int $month Month @@ -274,7 +274,7 @@ function displayBox($selectedDate, $month, $year) exit; } - // Sur click dans calendrier, appelle fonction dpClickDay + // Upon a click in the calendar, call dpClickDay function echo "trans("FormatDateShortJavaInput")."')\""; diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index d89336a14e8..c002fffd332 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -227,7 +227,7 @@ class DoliDBMysqli extends DoliDB * Select a database * * @param string $database Name of database - * @return boolean true if OK, false if KO + * @return boolean true if OK, false if failed */ public function select_db($database) { @@ -365,7 +365,7 @@ class DoliDBMysqli extends DoliDB } if (!preg_match("/^COMMIT/i", $query) && !preg_match("/^ROLLBACK/i", $query)) { - // Si requete utilisateur, on la sauvegarde ainsi que son resultset + // If user query, we save it along with its resultset if (!$ret) { $this->lastqueryerror = $query; $this->lasterror = $this->error(); @@ -412,7 +412,7 @@ class DoliDBMysqli extends DoliDB /** * Returns the current line (as an object) for the resultset cursor * - * @param mysqli_result $resultset Curseur de la requete voulue + * @param mysqli_result $resultset Cursor of the desired query * @return object|null Object result line or null if KO or end of cursor */ public function fetch_object($resultset) @@ -469,8 +469,8 @@ class DoliDBMysqli extends DoliDB /** * Return number of lines for result of a SELECT * - * @param mysqli_result $resultset Resulset of requests - * @return int Nb of lines + * @param mysqli_result $resultset Resultset of requests + * @return int Number of lines * @see affected_rows() */ public function num_rows($resultset) @@ -487,7 +487,7 @@ class DoliDBMysqli extends DoliDB /** * Return the number of lines in the result of a request INSERT, DELETE or UPDATE * - * @param mysqli_result $resultset Curseur de la requete voulue + * @param mysqli_result $resultset Cursor of the desired query * @return int Number of lines * @see num_rows() */ @@ -498,8 +498,7 @@ class DoliDBMysqli extends DoliDB if (!is_object($resultset)) { $resultset = $this->_results; } - // mysql necessite un link de base pour cette fonction contrairement - // a pqsql qui prend un resultset + // mysql require a db link, not like pqsql that takes a resultset return $this->db->affected_rows; } @@ -515,7 +514,7 @@ class DoliDBMysqli extends DoliDB if (!is_object($resultset)) { $resultset = $this->_results; } - // Si resultset en est un, on libere la memoire + // Si resultset is provided, free memory if (is_object($resultset)) { $resultset->free_result(); } @@ -604,7 +603,7 @@ class DoliDBMysqli extends DoliDB public function error() { if (!$this->connected) { - // Si il y a eu echec de connection, $this->db n'est pas valide pour mysqli_error. + // When there is a connection failure, $this->db is invalid for to get mysqli_error. return 'Not connected. Check setup parameters in conf/conf.php file and your mysql client and server versions'; } else { return $this->db->error; @@ -837,12 +836,12 @@ class DoliDBMysqli extends DoliDB * Create a table into database * * @param string $table Name of table - * @param array|string,position?:int,notnull?:int,visible?:int<-2,5>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,2>,disabled?:int<0,1>,arrayofkeyval?:array,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>}> $fields Tableau associatif [nom champ][tableau des descriptions] - * @param string $primary_key Nom du champ qui sera la clef primaire - * @param string $type Type de la table - * @param ?array $unique_keys Tableau associatifs Nom de champs qui seront clef unique => valeur - * @param string[] $fulltext_keys Tableau des Nom de champs qui seront indexes en fulltext - * @param array $keys Tableau des champs cles noms => valeur + * @param array|string,position?:int,notnull?:int,visible?:int<-2,5>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,2>,disabled?:int<0,1>,arrayofkeyval?:array,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>}> $fields Associative table [field name][table of descriptions] + * @param string $primary_key Name of the field that will be the primary key + * @param string $type Table type + * @param ?array $unique_keys Associative table: key=field, value=field value + * @param string[] $fulltext_keys Table of fields that will be indexed as fulltext + * @param array $keys Table of fields names => value * @return int Return integer <0 if KO, >=0 if OK */ public function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null) @@ -955,7 +954,7 @@ class DoliDBMysqli extends DoliDB * Return a pointer of line with description of a table or field * * @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 bool|mysqli_result Resultset x (x->Field, x->Type, ...) */ public function DDLDescTable($table, $field = "") @@ -1106,7 +1105,7 @@ class DoliDBMysqli extends DoliDB * Create a user and privileges to connect to database (even if database does not exists yet) * * @param string $dolibarr_main_db_host Ip server or '%' - * @param string $dolibarr_main_db_user Nom new user + * @param string $dolibarr_main_db_user Name of new user * @param string $dolibarr_main_db_pass Password for the new user * @param string $dolibarr_main_db_name Database name where user must be granted * @return int Return integer <0 if KO, >=0 if OK diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 4a24bc0b8af..a0b8109dc94 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -27,7 +27,7 @@ /** * \file htdocs/core/db/pgsql.class.php - * \brief Fichier de la class permettant de gerer une base pgsql + * \brief Class file for managing a pgsql database */ require_once DOL_DOCUMENT_ROOT.'/core/db/DoliDB.class.php'; @@ -46,7 +46,7 @@ class DoliDBPgsql extends DoliDB //! Charset public $forcecharset = 'UTF8'; // Can't be static as it may be forced with a dynamic value - //! Collate used to force collate when creating database + //! Collation used to force collate when creating database public $forcecollate = ''; // Can't be static as it may be forced with a dynamic value //! Version min database @@ -71,13 +71,13 @@ class DoliDBPgsql extends DoliDB /** * Constructor. - * This create an opened connection to a database server and eventually to a database + * This creates an opened connection to a database server and eventually to a database * * @param string $type Type of database (mysql, pgsql...). Not used. * @param string $host Address of database server - * @param string $user Nom de l'utilisateur autorise + * @param string $user Authorized user name * @param string $pass Password - * @param string $name Nom de la database + * @param string $name Database name * @param int $port Port of database server */ public function __construct($type, $host, $user, $pass, $name = '', $port = 0) // @phpstan-ignore constructor.unusedParameter @@ -112,11 +112,11 @@ class DoliDBPgsql extends DoliDB $this->connected = false; $this->ok = false; $this->error = $langs->trans("ErrorWrongHostParameter"); - dol_syslog(get_class($this)."::DoliDBPgsql : Erreur Connect, wrong host parameters", LOG_ERR); + dol_syslog(get_class($this)."::DoliDBPgsql : Connection Error, wrong host parameters", LOG_ERR); return; } - // Essai connection serveur + // Try server connection //print "$host, $user, $pass, $name, $port"; $this->db = $this->connect($host, $user, $pass, $name, $port); @@ -128,10 +128,10 @@ class DoliDBPgsql extends DoliDB $this->connected = false; $this->ok = false; $this->error = 'Host, login or password incorrect'; - dol_syslog(get_class($this)."::DoliDBPgsql : Erreur Connect ".$this->error.'. Failed to connect to host='.$host.' port='.$port.' user='.$user, LOG_ERR); + dol_syslog(get_class($this)."::DoliDBPgsql : Connection Error ".$this->error.'. Failed to connect to host='.$host.' port='.$port.' user='.$user, LOG_ERR); } - // If server connection serveur ok and DB connection is requested, try to connect to DB + // If server connection ok and DB connection is requested, try to connect to DB if ($this->connected && $name) { if ($this->select_db($name)) { $this->database_selected = true; @@ -142,10 +142,10 @@ class DoliDBPgsql extends DoliDB $this->database_name = ''; $this->ok = false; $this->error = $this->error(); - dol_syslog(get_class($this)."::DoliDBPgsql : Erreur Select_db ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::DoliDBPgsql : Select_db Error ".$this->error, LOG_ERR); } } else { - // Pas de selection de base demandee, ok ou ko + // No database selection requested, ok or ko $this->database_selected = false; } } @@ -592,7 +592,7 @@ class DoliDBPgsql extends DoliDB /** * 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 db request * @return false|object Object result line or false if KO or end of cursor */ public function fetch_object($resultset) @@ -607,7 +607,7 @@ class DoliDBPgsql extends DoliDB // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Return datas as an array + * Return data as an array * * @param resource $resultset Resultset of request * @return array|null|false Array or null if KO or end of cursor @@ -633,7 +633,7 @@ class DoliDBPgsql extends DoliDB public function fetch_row($resultset) { // phpcs:enable - // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connection + // If resultset not provided, we take the last used by connection if (!is_resource($resultset) && !is_object($resultset)) { $resultset = $this->_results; } @@ -668,10 +668,10 @@ class DoliDBPgsql extends DoliDB // 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 rows in the result of a request INSERT, DELETE or UPDATE * * @param resource $resultset Result set of request - * @return int Nb of lines + * @return int Number of lines * @see num_rows() */ public function affected_rows($resultset) @@ -681,8 +681,8 @@ class DoliDBPgsql extends DoliDB if (!is_resource($resultset) && !is_object($resultset)) { $resultset = $this->_results; } - // pgsql necessite un resultset pour cette fonction contrairement - // a mysql qui prend un link de base + // pgsql requires a resultset for this function contrary to + // mysql that requires a database link return pg_affected_rows($resultset); } @@ -699,7 +699,7 @@ class DoliDBPgsql extends DoliDB if (!is_resource($resultset) && !is_object($resultset)) { $resultset = $this->_results; } - // Si resultset en est un, on libere la memoire + // If it is a resource, we free the memory if (is_resource($resultset) || is_object($resultset)) { pg_free_result($resultset); } @@ -1071,13 +1071,13 @@ class DoliDBPgsql extends DoliDB /** * Create a table into database * - * @param string $table Nom de la table - * @param array|string,position?:int,notnull?:int,visible?:int<-2,5>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,2>,disabled?:int<0,1>,arrayofkeyval?:array,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>}> $fields Tableau associatif [nom champ][tableau des descriptions] - * @param string $primary_key Nom du champ qui sera la clef primaire + * @param string $table Table name + * @param array|string,position?:int,notnull?:int,visible?:int<-2,5>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,2>,disabled?:int<0,1>,arrayofkeyval?:array,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>}> $fields Associative table [field name][table of descrioptions] + * @param string $primary_key Name of the field that will be the primary key * @param string $type Type de la table - * @param ?array $unique_keys Tableau associatifs Nom de champs qui seront clef unique => valeur - * @param string[] $fulltext_keys Tableau des Nom de champs qui seront indexes en fulltext - * @param array $keys Tableau des champs cles noms => valeur + * @param ?array $unique_keys Associative table - name of fields that will be unique key => value + * @param string[] $fulltext_keys Tableau des Name of fields that will be indexed in fulltext + * @param array $keys Table of key fields - names => value * @return int Return integer <0 if KO, >=0 if OK */ public function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null) @@ -1445,7 +1445,7 @@ class DoliDBPgsql extends DoliDB if (file_exists('/usr/bin/pg_dump')) { $fullpathofdump = '/usr/bin/pg_dump'; } else { - // TODO L'utilisateur de la base doit etre un superadmin pour lancer cette commande + // TODO The database user must be a superadmin to run this command $resql = $this->query('SHOW data_directory'); if ($resql) { $liste = $this->fetch_array($resql); @@ -1458,9 +1458,9 @@ class DoliDBPgsql extends DoliDB } /** - * 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() { diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index 7508e650082..329cb14ae78 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024-2026 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -123,7 +123,7 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) LOCATION: SEQUENCE:0 STATUS:CONFIRMED - SUMMARY:Tâche 1 heure + SUMMARY:Task 1 hour TRANSP:OPAQUE END:VEVENT @@ -139,7 +139,7 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) LOCATION: SEQUENCE:0 STATUS:CONFIRMED - SUMMARY:Tâche 1 jour + SUMMARY:Task 1 day TRANSP:TRANSPARENT END:VEVENT */ diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php index 58ceff905b1..472c4948425 100644 --- a/htdocs/core/login/functions_ldap.php +++ b/htdocs/core/login/functions_ldap.php @@ -1,7 +1,7 @@ * Copyright (C) 2008-2021 Regis Houssin - * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024-2026 MDW * Copyright (C) 2024 William Mead * * This program is free software; you can redistribute it and/or modify @@ -28,7 +28,7 @@ /** * Check validity of user/password/entity - * If test is ko, reason must be filled into $_SESSION["dol_loginmesg"] + * If the test fails, the reason must be filled into $_SESSION["dol_loginmesg"] * * @param string $usertotest Login * @param string $passwordtotest Password @@ -68,7 +68,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) if ($usertotest) { dol_syslog("functions_ldap::check_user_password_ldap usertotest=".$usertotest." passwordtotest=".preg_replace('/./', '*', $passwordtotest)." entitytotest=".$entitytotest); - // If test username/password asked, we define $test=false and $login var if ok, set $_SESSION["dol_loginmesg"] if ko + // If testing user/password is requested, we define $test=false and $login var if successful, and set $_SESSION["dol_loginmesg"] if failed. $ldaphost = $dolibarr_main_auth_ldap_host; $ldapport = $dolibarr_main_auth_ldap_port; $ldapversion = $dolibarr_main_auth_ldap_version; @@ -141,7 +141,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) // If LDAP need a dn with login like "uid=jbloggs,ou=People,dc=foo,dc=com", default dn may work even if previous code with // admin login no executed. $ldap->searchUser = $ldapuserattr."=".$usertotest.",".$ldapdn; // Default dn (will work if LDAP accept a dn with login value inside) - // But if LDAP need a dn with name like "cn=Jhon Bloggs,ou=People,dc=foo,dc=com", previous part must have been executed to have + // However, if LDAP requires a DN with a name like "cn=Jhon Bloggs,ou=People,dc=foo,dc=com", the previous part must have been executed to have // dn detected into ldapUserDN. if ($resultFetchLdapUser && !empty($ldap->ldapUserDN)) { $ldap->searchUser = $ldap->ldapUserDN; @@ -166,11 +166,11 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) // Note: Test on date validity is done later natively with isNotIntoValidityDateRange() by core after calling checkLoginPassEntity() that call this method - // ldap2dolibarr synchronisation + // ldap2dolibarr synchronization if ($login && isModEnabled('ldap') && getDolGlobalInt('LDAP_SYNCHRO_ACTIVE') == Ldap::SYNCHRO_LDAP_TO_DOLIBARR) { // ldap2dolibarr synchronization dol_syslog("functions_ldap::check_user_password_ldap Sync ldap2dolibarr"); - // On charge les attributes du user ldap + // We fetch the LDAP user attributes if ($ldapdebug) { print "DEBUG: login ldap = ".$login."
\n"; } @@ -186,7 +186,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) print "DEBUG: badPasswordTime = ".dol_print_date($ldap->badpwdtime, 'day')."
\n"; } - // On recherche le user dolibarr en fonction de son SID ldap (only for Active Directory) + // We search for the Dolibarr user based on its LDAP SID (only for Active Directory) $sid = null; if (getDolGlobalString('LDAP_SERVER_TYPE') == "activedirectory") { $sid = $ldap->getObjectSid($login); diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php index 7e6e28669c6..a4afddb467c 100644 --- a/htdocs/core/modules/mailings/contacts1.modules.php +++ b/htdocs/core/modules/mailings/contacts1.modules.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005 Rodolphe Quiedeville * Copyright (C) 2005-2009 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024-2026 MDW * Copyright (C) 2024-2025 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -125,9 +125,9 @@ class mailing_contacts1 extends MailingTargets /** - * Affiche formulaire de filtre qui apparait dans page de selection des destinataires de mailings + * Show filter form that appears in a page to select the recipients of mailings * - * @return string Retourne zone select + * @return string HTML for selection filter. */ public function formFilter() { diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index 177d3e676df..c007ccb4e10 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2018-2025 Frédéric France - * Copyright (C) 2024 MDW + * Copyright (C) 2024-2026 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,7 +22,7 @@ /** * \file htdocs/core/modules/mailings/fraise.modules.php * \ingroup mailing - * \brief File of class to generate target according to rule Fraise + * \brief Class file to generate targets according to the Fraise rule */ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php'; @@ -30,7 +30,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; /** - * Class to generate target according to rule Fraise + * Class to generate targets according to the Fraise rule */ class mailing_fraise extends MailingTargets { @@ -71,9 +71,9 @@ class mailing_fraise extends MailingTargets /** - * On the main mailing area, there is a box with statistics. - * If you want to add a line in this report you must provide an - * array of SQL request that returns two field: + * In the main mailing area, there is a box with statistics. + * If you want to add a line in this report, you must provide an + * array of SQL requests that return two fields: * One called "label", One called "nb". * * @return string[] Array with SQL requests @@ -95,12 +95,12 @@ class mailing_fraise extends MailingTargets /** - * Return here number of distinct emails returned by your selector. + * Returns the number of distinct emails returned by your selector. * For example if this selector is used to extract 500 different * emails from a text file, this function must return 500. * - * @param string $sql Requete sql de comptage - * @return int|string Nb of recipient, or <0 if error, or '' if NA + * @param string $sql SQL query for counting + * @return int|string Number of recipients, or <0 if error, or '' if N/A */ public function getNbOfRecipients($sql = '') { @@ -118,9 +118,9 @@ class mailing_fraise extends MailingTargets /** - * Affiche formulaire de filtre qui apparait dans page de selection des destinataires de mailings + * Displays the filter form that appears on the mailing recipient selection page * - * @return string Retourne zone select + * @return string Returns the select area */ public function formFilter() { @@ -222,7 +222,7 @@ class mailing_fraise extends MailingTargets /** - * Provide the URL to the car of the source information of the recipient for the mailing + * Provides the URL to the card of the source information of the recipient for the mailing * * @param int $id ID * @return string URL link @@ -235,10 +235,10 @@ class mailing_fraise extends MailingTargets // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Ajoute destinataires dans table des cibles + * Adds recipients to the targets table * * @param int $mailing_id Id of emailing - * @return int Return integer < 0 si erreur, nb ajout si ok + * @return int Returns integer < 0 if error, number added if successful */ public function add_to_target($mailing_id) { diff --git a/htdocs/core/modules/mailings/modules_mailings.php b/htdocs/core/modules/mailings/modules_mailings.php index 7e73d79588a..f125d523533 100644 --- a/htdocs/core/modules/mailings/modules_mailings.php +++ b/htdocs/core/modules/mailings/modules_mailings.php @@ -149,10 +149,9 @@ class MailingTargets // This can't be abstract as it is used for some method } /** - * Affiche formulaire de filtre qui apparait dans page de selection - * des destinataires de mailings + * Displays filter form that appears on the mailing recipient selection page * - * @return string Retourne zone select + * @return string Returns select area */ public function formFilter() { @@ -244,20 +243,20 @@ class MailingTargets // This can't be abstract as it is used for some method dol_syslog(__METHOD__.": mailing ".$j." targets added"); /* - //Update the status to show thirdparty mail that don't want to be contacted anymore' + //Update the status to show third-party emails that no longer wish to be contacted' $sql = "UPDATE ".$this->db->prefix()."mailing_cibles"; $sql .= " SET statut=3"; $sql .= " WHERE fk_mailing = ".((int) $mailing_id)." AND email in (SELECT email FROM ".$this->db->prefix()."societe where fk_stcomm=-1)"; $sql .= " AND source_type='thirdparty'"; - dol_syslog(__METHOD__.": mailing update status to display thirdparty mail that do not want to be contacted"); + dol_syslog(__METHOD__.": mailing update status to display third-party emails that no longer wish to be contacted"); $result=$this->db->query($sql); - //Update the status to show contact mail that don't want to be contacted anymore' + //Update the status to show contact emails that no longer wish to be contacted' $sql = "UPDATE ".$this->db->prefix()."mailing_cibles"; $sql .= " SET statut=3"; $sql .= " WHERE fk_mailing = ".((int) $mailing_id)." AND source_type='contact' AND (email in (SELECT sc.email FROM ".$this->db->prefix()."socpeople AS sc "; $sql .= " INNER JOIN ".$this->db->prefix()."societe s ON s.rowid=sc.fk_soc WHERE s.fk_stcomm=-1 OR no_email=1))"; - dol_syslog(__METHOD__.": mailing update status to display contact mail that do not want to be contacted",LOG_DEBUG); + dol_syslog(__METHOD__.": mailing update status to display contact emails that no longer wish to be contacted",LOG_DEBUG); $result=$this->db->query($sql); */ @@ -284,7 +283,7 @@ class MailingTargets // This can't be abstract as it is used for some method // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Supprime tous les destinataires de la table des cibles + * Deletes all recipients from the targets table * * @param int $mailing_id Id of emailing * @return void diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index 86dd9aef764..b66c7f095cc 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -5,7 +5,7 @@ * Copyright (C) 2012 Charles-Fr BENKE * Copyright (C) 2015 Juanjo Menent * Copyright (C) 2024 Frédéric France - * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024-2026 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ /** * \file htdocs/exports/export.php * \ingroup export - * \brief Pages of export Wizard + * \brief Export Wizard pages */ require_once '../main.inc.php'; @@ -185,7 +185,7 @@ $result = restrictedArea($user, 'export'); * Actions */ -if ($action == 'selectfield' && $user->hasRight('export', 'creer')) { // Selection of field at step 2 +if ($action == 'selectfield' && $user->hasRight('export', 'creer')) { // Select field at step 2 $fieldsarray = $objexport->array_export_fields[0]; $fieldsentitiesarray = $objexport->array_export_entities[0]; $fieldsdependenciesarray = $objexport->array_export_dependencies[0]; @@ -209,7 +209,7 @@ if ($action == 'selectfield' && $user->hasRight('export', 'creer')) { // Sel var_dump($fieldsdependenciesarray);*/ $listofdependencies = array(); if (!empty($fieldsentitiesarray[$field]) && !empty($fieldsdependenciesarray[$fieldsentitiesarray[$field]])) { - // We found a dependency on the type of field + // Found a dependency on the field type $tmp = $fieldsdependenciesarray[$fieldsentitiesarray[$field]]; // $fieldsdependenciesarray=array('element'=>'fd.rowid') or array('element'=>array('fd.rowid','ab.rowid')) if (is_array($tmp)) { $listofdependencies = $tmp; @@ -217,7 +217,7 @@ if ($action == 'selectfield' && $user->hasRight('export', 'creer')) { // Sel $listofdependencies = array($tmp); } } elseif (!empty($field) && !empty($fieldsdependenciesarray[$field])) { - // We found a dependency on a dedicated field + // Found a dependency on a specific field $tmp = $fieldsdependenciesarray[$field]; // $fieldsdependenciesarray=array('fd.fieldx'=>'fd.rowid') or array('fd.fieldx'=>array('fd.rowid','ab.rowid')) if (is_array($tmp)) { $listofdependencies = $tmp; @@ -434,7 +434,7 @@ if ($step == 4 && $action == 'submitFormField' && $user->hasRight('export', 'lir accessforbidden(); } - // on boucle sur les champs selectionne pour recuperer la valeur + // loop over selected fields to retrieve the value if (is_array($objexport->array_export_TypeFields[0])) { $_SESSION["export_filtered_fields"] = array(); foreach ($objexport->array_export_TypeFields[0] as $code => $type) { // $code: s.fieldname $value: Text|Boolean|List:ccc @@ -566,7 +566,7 @@ if ($step == 2 && $datatoexport) { print $objexport->array_export_module[0]->getName(); print ''; - // Lot de donnees a exporter + // Dataset to export print ''.$langs->trans("DatasetToExport").''; print ''; $entity = preg_replace('/:.*$/', '', $objexport->array_export_icon[0]); @@ -829,7 +829,7 @@ if ($step == 3 && $datatoexport) { print ''.$langs->trans("SelectFilterFields").'...

'; - // un formulaire en plus pour recuperer les filtres + // An extra form to get the filters print ''; print ''; @@ -989,7 +989,7 @@ if ($step == 4 && $datatoexport) { print dolPrintHTML($titleofmodule); print ''; - // Lot de donnees a exporter + // Dataset to export print ''.$langs->trans("DatasetToExport").''; print ''; $entity = preg_replace('/:.*$/', '', $objexport->array_export_icon[0]); @@ -1264,7 +1264,7 @@ if ($step == 5 && $datatoexport) { $head[$h][1] = $langs->trans("Step")." 2"; $h++; - // si le filtrage est parameter pour l'export ou pas + // whether filtering is a parameter for the export or not if ($usefilters && isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0])) { $head[$h][0] = DOL_URL_ROOT.'/exports/export.php?step=3&datatoexport='.$datatoexport; $head[$h][1] = $langs->trans("Step")." 3"; diff --git a/htdocs/fourn/facture/rapport.php b/htdocs/fourn/facture/rapport.php index 4ac1da28da9..a2cbe28e371 100644 --- a/htdocs/fourn/facture/rapport.php +++ b/htdocs/fourn/facture/rapport.php @@ -129,7 +129,7 @@ llxHeader('', $titre, '', '', 0, 0, '', '', '', 'mod-fourn-facture page-rapport' print load_fiche_titre($titre, '', 'supplier_invoice'); -// Formulaire de generation +// Generation form print ''; print ''; print ''; diff --git a/htdocs/ftp/admin/ftpclient.php b/htdocs/ftp/admin/ftpclient.php index 9dc2e36913a..debcbc45df6 100644 --- a/htdocs/ftp/admin/ftpclient.php +++ b/htdocs/ftp/admin/ftpclient.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004-2022 Laurent Destailleur * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2024 Frédéric France - * Copyright (C) 2025 MDW + * Copyright (C) 2025-2026 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -180,7 +180,7 @@ print '
'; if (!function_exists('ftp_connect')) { print $langs->trans("FTPFeatureNotSupportedByYourPHP"); } else { - // Formulaire ajout + // Add form print ''; print ''; diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index b79c0154d9e..be4132f8355 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -1421,7 +1421,7 @@ if ($ok && GETPOST('clean_perm_table', 'alpha')) { $obj = $db->fetch_object($resql); if ($obj->id > 0) { print 'Found line with id '.$obj->id.', label "'.$obj->label.'" of module "'.$obj->module.'" to delete'; - if (GETPOST('clean_perm_table', 'alpha') == 'confirmed') { + if (GETPOST('clean_perm_table', 'alpha') == 'confirmed') { // If confirmed, proceed with deletion $sqldelete = "DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE id = ".((int) $obj->id); $resqldelete = $db->query($sqldelete); if (!$resqldelete) { @@ -1464,7 +1464,7 @@ if ($ok && GETPOST('clean_ecm_files_table', 'alpha')) { $obj = $db->fetch_object($resql); if ($obj->rowid > 0) { $filetocheck = DOL_DATA_ROOT.'/'.$obj->filepath.'/'.$obj->filename; - $nbfile++; + $nbfile++; // Count of files analyzed if (!dol_is_file($filetocheck) && !dol_is_file($filetocheck.'.noexe')) { $nbfiletodelete++; if ($nbfiletodelete <= $MAXTODELETE) { @@ -2057,7 +2057,7 @@ if ($ok && GETPOST('recalculateinvoicetotal') == 'confirmed') { fd.fk_facture = $obj->rowid"; $ressql_calculs = $db->query($sql_calculs); while ($obj_calcul = $db->fetch_object($ressql_calculs)) { - // Calcul de la somme des paiements reçus + // Calculate the sum of received payments $sql_paiements = "SELECT SUM(amount) as somme from ".MAIN_DB_PREFIX."paiement_facture WHERE fk_facture = $obj->rowid"; $montantPaiements = $db->fetch_object($db->query($sql_paiements))->somme; $totHt = ($obj_calcul->total_ht ? price2num($obj_calcul->total_ht, 'MT') : 0); diff --git a/htdocs/intracommreport/card.php b/htdocs/intracommreport/card.php index f32e4250228..0d81894d2dd 100644 --- a/htdocs/intracommreport/card.php +++ b/htdocs/intracommreport/card.php @@ -2,6 +2,7 @@ /* Copyright (C) 2017 Laurent Destailleur * Copyright (C) ---Put here your own copyright and developer email--- * Copyright (C) 2024-2026 Frédéric France + * Copyright (C) 2026 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +29,7 @@ * Terms * * DEB = Declaration d'Exchanges de Biens (FR) = Declaration of Exchange of Goods (EN) - * DES = Déclaration Européenne de Services (FR) = European Declaration of Services (EN) + * DES = Declaration Europeenne de Services (FR) = European Declaration of Services (EN) * * INTRACOMM: Douanes françaises (FR) = french customs (EN) - https://www.douane.gouv.fr/professionnels/commerce-international/import-export * diff --git a/htdocs/intracommreport/class/intracommreport.class.php b/htdocs/intracommreport/class/intracommreport.class.php index 93513905112..9826241e5b8 100644 --- a/htdocs/intracommreport/class/intracommreport.class.php +++ b/htdocs/intracommreport/class/intracommreport.class.php @@ -360,7 +360,7 @@ class IntracommReport extends CommonObject $declaration_des = $e->addChild('declaration_des'); $declaration_des->addChild('num_des', self::getDeclarationNumber($this->numero_declaration)); - $declaration_des->addChild('num_tvaFr', $mysoc->tva_intra ?? ''); // /^FR[a-Z0-9]{2}[0-9]{9}$/ // Doit faire 13 caractères + $declaration_des->addChild('num_tvaFr', $mysoc->tva_intra ?? ''); // /^FR[a-Z0-9]{2}[0-9]{9}$/ // Must be 13 characters $declaration_des->addChild('mois_des', (string) $period_month); $declaration_des->addChild('an_des', (string) $period_year); diff --git a/htdocs/opensurvey/lib/opensurvey.lib.php b/htdocs/opensurvey/lib/opensurvey.lib.php index b029021ad40..52c57fa3ac3 100644 --- a/htdocs/opensurvey/lib/opensurvey.lib.php +++ b/htdocs/opensurvey/lib/opensurvey.lib.php @@ -1,7 +1,7 @@ * Copyright (C) 2014 Marcos García - * Copyright (C) 2024 MDW + * Copyright (C) 2024-2026 MDW * Copyright (C) 2024-2026 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -161,8 +161,8 @@ function issetAndNoEmpty($name, $tableau = null) /** * Function for generating URLs for surveys. * - * @param string $id L'identifiant du sondage - * @param bool $admin True pour générer une URL pour l'administration d'un sondage, False pour un URL publique + * @param string $id Survey ID + * @param bool $admin True to generate a URL for survey administration, False for a public URL * @return string The url of the survey */ function getUrlSondage($id, $admin = false) diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index 2179eb18e83..705f15983ff 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2019 Cedric Ancelin * Copyright (C) 2024-2025 Frédéric France - * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024-2026 MDW * Copyright (C) 2025 William Mead * Copyright (C) 2025 Charlene Benke * @@ -91,7 +91,7 @@ class Products extends DolibarrApi */ public function get($id, $includestockdata = 0, $includesubproducts = false, $includeparentid = false, $includetrans = false) { - if ($id < 1 ) { + if ($id < 1) { throw new RestException(400, 'No Product with id<1 can exist'); } return $this->_fetch($id, '', '', '', $includestockdata, $includesubproducts, $includeparentid, false, $includetrans); @@ -399,7 +399,7 @@ class Products extends DolibarrApi */ public function put($id, $request_data = null) { - if ($id < 1 ) { + if ($id < 1) { throw new RestException(400, 'No Product with id<1 can exist'); } @@ -570,7 +570,7 @@ class Products extends DolibarrApi */ public function delete($id) { - if ($id < 1 ) { + if ($id < 1) { throw new RestException(400, 'No Product with id<1 can exist'); } if (!DolibarrApiAccess::$user->hasRight('produit', 'supprimer')) { @@ -2260,7 +2260,7 @@ class Products extends DolibarrApi throw new RestException(403, 'Access not allowed for login ' . DolibarrApiAccess::$user->login); } - // Récupérer les contacts externes et internes + // Retrieve external and internal contacts $contacts = $this->product->liste_contact(-1, 'external', 0, $type); $socpeoples = $this->product->liste_contact(-1, 'internal', 0, $type); diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index e07e9556eaa..773b3d7a4aa 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -3302,7 +3302,7 @@ class Product extends CommonObject /* $this->prices_by_qty[$i]=$result["price_by_qty"]; $this->prices_by_qty_id[$i]=$result["rowid"]; - // Récuperation de la liste des prix selon qty si flag positionné + // Get the pricelist according to the qty if flag is set if ($this->prices_by_qty[$i] == 1) { $sql = "SELECT rowid, price, unitprice, quantity, remise_percent, remise, price_base_type"; @@ -3357,7 +3357,7 @@ class Product extends CommonObject // Price by quantity $this->prices_by_qty[0] = $result["price_by_qty"]; $this->prices_by_qty_id[0] = $result["rowid"]; - // Récuperation de la liste des prix selon qty si flag positionné + // Get the pricelist according to the qty if flag is set if ($this->prices_by_qty[0] == 1) { $sql = "SELECT rowid,price, unitprice, quantity, remise_percent, remise, remise, price_base_type"; $sql .= " FROM ".$this->db->prefix()."product_price_by_qty"; @@ -3419,7 +3419,7 @@ class Product extends CommonObject // Price by quantity $this->prices_by_qty[$i] = (!empty($result["price_by_qty"]) ? $result["price_by_qty"] : 0); $this->prices_by_qty_id[$i] = (!empty($result["rowid"]) ? $result["rowid"] : 0); - // Récuperation de la liste des prix selon qty si flag positionné + // Get the pricelist according to the qty if flag is set if ($this->prices_by_qty[$i] == 1) { $sql = "SELECT rowid, price, unitprice, quantity, remise_percent, remise, price_base_type"; $sql .= " FROM ".$this->db->prefix()."product_price_by_qty"; @@ -4034,7 +4034,7 @@ class Product extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Charge tableau des stats réception fournisseur pour le produit/service + * Loads supplier reception statistics table for given product or service * * @param int $socid Id thirdparty to filter on a thirdparty * @param string $filtrestatut Id status to filter on a status @@ -4486,7 +4486,7 @@ class Product extends CommonObject /** * Load array of statistics for recurring supplier invoice for product/service * - * @param int $socid Id societe + * @param int $socid Supplier ID * @return int Array of stats in $this->stats_facturefournrec, <0 if ko or >0 if ok */ public function load_stats_facturefournrec($socid = 0) diff --git a/htdocs/product/price.php b/htdocs/product/price.php index debf97893ab..a857a96bc67 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -13,7 +13,7 @@ * Copyright (C) 2016 Ferran Marcet * Copyright (C) 2018-2026 Frédéric France * Copyright (C) 2018 Nicolas ZABOURI - * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024-2026 MDW * Copyright (C) 2025 Mélina Joum * * This program is free software; you can redistribute it and/or modify @@ -622,7 +622,7 @@ if (empty($reshook)) { // Add or update price by quantity if ($action == 'update_price_by_qty' && $permissiontoadd) { - // Récupération des variables + // Get the variables $rowid = GETPOSTINT('rowid'); $priceid = GETPOSTINT('priceid'); $newprice = price2num(GETPOST("price"), 'MU', 2); @@ -648,7 +648,7 @@ if (empty($reshook)) { $price = price2num($newprice, 'MU'); $unitPrice = price2num((float) $price / (float) $quantity, 'MU'); - // Ajout / mise à jour + // Update or add if ($rowid > 0) { $sql = "UPDATE ".MAIN_DB_PREFIX."product_price_by_qty SET"; $sql .= " price=".((float) $price).","; diff --git a/htdocs/product/stock/class/api_productlots.class.php b/htdocs/product/stock/class/api_productlots.class.php index 6e922e11dce..134a2e7ed8f 100644 --- a/htdocs/product/stock/class/api_productlots.class.php +++ b/htdocs/product/stock/class/api_productlots.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2016 Laurent Destailleur - * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024-2026 MDW * Copyright (C) 2025 William Mead * Copyright (C) 2025 Frédéric France * @@ -129,7 +129,7 @@ class Productlots extends DolibarrApi $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_lot_extrafields AS ple ON ple.fk_object = pl.rowid"; $sql .= " WHERE 1=1"; - // Filtres universels + // Global filters if ($sqlfilters) { $errormessage = ''; $sql .= forgeSQLFromUniversalSearchCriteria($sqlfilters, $errormessage); @@ -138,7 +138,7 @@ class Productlots extends DolibarrApi } } - // Clone pour total (avant ORDER/LIMIT) + // Clone for total (before ORDER/LIMIT) $sqlTotals = preg_replace('/^\s*SELECT\s+pl\.rowid/i', 'SELECT COUNT(pl.rowid) AS total', $sql); // ORDER BY @@ -180,7 +180,7 @@ class Productlots extends DolibarrApi if ($row && isset($row->total)) $total = (int) $row->total; } - // Evite division par zéro + // Avoid division by zero $safeLimit = ($limit > 0) ? (int) $limit : max(1, count($obj_ret)); $pageCount = (int) ceil($total / $safeLimit); diff --git a/htdocs/product/stock/productlot_card.php b/htdocs/product/stock/productlot_card.php index 74cc46d1604..29b3238dadc 100644 --- a/htdocs/product/stock/productlot_card.php +++ b/htdocs/product/stock/productlot_card.php @@ -4,7 +4,7 @@ * Copyright (C) 2021 Noé Cendrier * Copyright (C) 2024-2026 Frédéric France * Copyright (C) 2025 Alexandre Spangaro - * Copyright (C) 2025 MDW + * Copyright (C) 2025-2026 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -252,7 +252,7 @@ if (empty($reshook)) { if ($action == 'setqc_frequency' && $permissiontoadd && ! GETPOST('cancel', 'alpha')) { $result = $object->setValueFrom('qc_frequency', GETPOST('qc_frequency'), '', null, 'int', '', $user, 'PRODUCT_MODIFY'); - if ($result < 0) { // Prévoir un test de format de durée + if ($result < 0) { // To provide a duration format test setEventMessages($object->error, null, 'errors'); $action = 'editqc_frequency'; } else { diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_card.php b/htdocs/product/stock/stocktransfer/stocktransfer_card.php index 81fcee7e4ea..4e6ed30b29a 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_card.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_card.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024-2026 MDW * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025-2026 Pierre Ardoin * @@ -148,7 +148,7 @@ if (empty($reshook)) { // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; - // On remet cette lecture de permission ici car nécessaire d'avoir le nouveau statut de l'objet après toute action exécutée dessus (après incrémentation par example, le bouton supprimer doit disparaître) + // We put this permission read here because it is necessary to have the new status of the object after any executed action on it (for example, the delete button must disappear after incrementation) $permissiontodelete = $user->rights->stocktransfer->stocktransfer->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); // Actions when linking object each other @@ -313,7 +313,7 @@ if (empty($reshook)) { } } - // Annulation décrémentation + // Cancel Decrementation if ($action == 'confirm_destockcancel' && $confirm == 'yes' && $object->status == $object::STATUS_TRANSFERED && $permissiontoadd) { $lines = $object->getLinesArray(); if (!empty($lines)) { @@ -340,7 +340,7 @@ if (empty($reshook)) { } } - // Incrémentation + // Incrementing if ($action == 'confirm_addstock' && $confirm == 'yes' && $object->status == $object::STATUS_TRANSFERED && $permissiontoadd) { $lines = $object->getLinesArray(); if (!empty($lines)) { @@ -372,7 +372,7 @@ if (empty($reshook)) { } } - // Annulation incrémentation + // Cancel Incrementing if ($action == 'confirm_addstockcancel' && $confirm == 'yes' && $object->status == $object::STATUS_CLOSED && $permissiontoadd) { $lines = $object->getLinesArray(); if (!empty($lines)) { @@ -427,7 +427,7 @@ $help_url = ''; llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-product page-stock-stocktransfer_stocktransfer_card'); -// Example : Adding jquery code +// Example: Adding jQuery code print '