From eb8960bcd12f390fdfd1f0775ab098ccb5cfc264 Mon Sep 17 00:00:00 2001 From: MDW Date: Thu, 18 Jan 2024 23:04:20 +0100 Subject: [PATCH] Qual: Cleanup method to ignore misspelled key # Qual: Cleanup method to ignore misspelled key With the method to ignore lines, the code can be cleaned up to ignore the spelling issue. --- dev/tools/codespell/codespell-lines-ignore.txt | 3 ++- htdocs/core/lib/admin.lib.php | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/tools/codespell/codespell-lines-ignore.txt b/dev/tools/codespell/codespell-lines-ignore.txt index 2f1cfff2ccc..0d4e979d84a 100644 --- a/dev/tools/codespell/codespell-lines-ignore.txt +++ b/dev/tools/codespell/codespell-lines-ignore.txt @@ -1,4 +1,5 @@ - + $objMod->dictionaries = $objMod->{"dictionnaries"}; // For backward compatibility + if (empty($objMod->dictionaries) && !empty($objMod->{"dictionnaries"})) { print 'id.'">'; $reponsesadd = str_split($obj->reponses); $sql .= " SET reponses = '".$db->escape($reponsesadd)."'"; diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 3afbc7bd247..c0d7baad366 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1379,9 +1379,8 @@ function complete_dictionary_with_modules(&$taborder, &$tabname, &$tablib, &$tab // phpcs:disable // Complete the arrays &$tabname,&$tablib,&$tabsql,&$tabsqlsort,&$tabfield,&$tabfieldvalue,&$tabfieldinsert,&$tabrowid,&$tabcond - // Note: "diction"."naries" to prevent codespell from detecting a spelling error. - if (empty($objMod->dictionaries) && !empty($objMod->{"dicton"."naries"})) { - $objMod->dictionaries = $objMod->{"diction"."naries"}; // For backward compatibility + if (empty($objMod->dictionaries) && !empty($objMod->{"dictionnaries"})) { + $objMod->dictionaries = $objMod->{"dictionnaries"}; // For backward compatibility } // phpcs:enable