From b0b02794ee5df988347faed59e2bc3ebfdcdb89a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 11 Jan 2025 11:55:12 +0100 Subject: [PATCH 01/13] fix phpstan and phan --- htdocs/core/lib/security.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 6a0e5de24da..b5ed5542749 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -245,7 +245,7 @@ function dolDecrypt($chain, $key = '') * Use 'md5' if hash is not needed for security purpose. For security need, prefer 'auto'. * @param int $nosalt Do not include any salt * @param int $mode 0=Return encoded password, 1=Return array with encoding password + encoding algorithm - * @return string|array Hash of string or array with pass_encrypted and pass_encoding + * @return string|array{pass_encrypted:string,pass_encoding:string} Hash of string or array with pass_encrypted and pass_encoding * @see getRandomPassword(), dol_verifyHash() */ function dol_hash($chain, $type = '0', $nosalt = 0, $mode = 0) From be6869f388c1ea7029a2df6b180b6ce953a89725 Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Mon, 13 Jan 2025 01:05:34 +0100 Subject: [PATCH 02/13] Fix date selector html --- htdocs/core/class/html.form.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d148f8fd784..7a7ebef6936 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -7287,7 +7287,7 @@ class Form // You can set MAIN_POPUP_CALENDAR to 'eldy' or 'jquery' $usecalendar = 'combo'; if (!empty($conf->use_javascript_ajax) && (!getDolGlobalString('MAIN_POPUP_CALENDAR') || getDolGlobalString('MAIN_POPUP_CALENDAR') != "none")) { - $usecalendar = ((!getDolGlobalString('MAIN_POPUP_CALENDAR') || getDolGlobalString('MAIN_POPUP_CALENDAR') == 'eldy') ? 'jquery' : $conf->global->MAIN_POPUP_CALENDAR); + $usecalendar = ((!getDolGlobalString('MAIN_POPUP_CALENDAR') || getDolGlobalString('MAIN_POPUP_CALENDAR') == 'eldy') ? 'jquery' : getDolGlobalString("MAIN_POPUP_CALENDAR")); } if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { // If we use a text browser or screen reader, we use the 'combo' date selector @@ -7317,7 +7317,7 @@ class Form if (!$disabled) { $retstringbuttom = ''; } else { $retstringbuttom = ''; @@ -7364,7 +7364,7 @@ class Form // Input area to enter date manually $retstring .= '
'; - $retstring .= 'trans("FormatDateShortJavaInput")) . '\'); "'; // FormatDateShortInput for dol_print_date / FormatDateShortJavaInput that is same for javascript From 0a80d437dec235b3796a2d51014846e0237dcef3 Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Mon, 13 Jan 2025 12:31:08 +0100 Subject: [PATCH 03/13] Doc --- htdocs/theme/eldy/badges.inc.php | 3 +++ htdocs/theme/eldy/btn.inc.php | 3 ++- htdocs/theme/eldy/dropdown.inc.php | 4 +++- htdocs/theme/eldy/emaillayout.inc.php | 2 ++ htdocs/theme/eldy/flags-sprite.inc.php | 2 +- htdocs/theme/eldy/global.inc.php | 2 +- htdocs/theme/eldy/info-box.inc.php | 2 +- htdocs/theme/eldy/main_menu_fa_icons.inc.php | 2 +- htdocs/theme/eldy/manifest.json.php | 1 + htdocs/theme/eldy/progress.inc.php | 5 +++-- htdocs/theme/eldy/timeline.inc.php | 3 ++- htdocs/theme/md/badges.inc.php | 4 +++- htdocs/theme/md/btn.inc.php | 3 ++- htdocs/theme/md/dropdown.inc.php | 4 +++- htdocs/theme/md/flags-sprite.inc.php | 3 ++- htdocs/theme/md/info-box.inc.php | 3 ++- htdocs/theme/md/main_menu_fa_icons.inc.php | 3 ++- htdocs/theme/md/progress.inc.php | 3 --- htdocs/theme/md/style.css.php | 3 ++- 19 files changed, 36 insertions(+), 19 deletions(-) diff --git a/htdocs/theme/eldy/badges.inc.php b/htdocs/theme/eldy/badges.inc.php index afd7e020886..01a3f1d4824 100644 --- a/htdocs/theme/eldy/badges.inc.php +++ b/htdocs/theme/eldy/badges.inc.php @@ -28,6 +28,9 @@ if (!defined('ISLOADEDBYSTEELSHEET')) { @phan-var-force string $colorblind_deuteranopes_badgeWarning '; ?> + +/* IDE Hack