diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 289a2b3082c..820e84f7f66 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -409,8 +409,7 @@ function completeFileArrayWithDatabaseInfo(&$filearray, $relativedir) */ function dol_compare_file($a, $b) { - global $sortorder; - global $sortfield; + global $sortorder, $sortfield; $sortorder = strtoupper($sortorder); @@ -440,6 +439,8 @@ function dol_compare_file($a, $b) } return ($a->size < $b->size) ? $retup : $retdown; } + + return 0; } diff --git a/htdocs/core/lib/ftp.lib.php b/htdocs/core/lib/ftp.lib.php index 1b7cfc7ca73..8270f9927f7 100644 --- a/htdocs/core/lib/ftp.lib.php +++ b/htdocs/core/lib/ftp.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2022 Anthony Berton +/* Copyright (C) 2022-2023 Laurent Destailleur + * Copyright (C) 2022 Anthony Berton * * 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,8 +24,6 @@ */ - - /** * Connect to FTP server * @@ -153,6 +151,7 @@ function dol_ftp_close($connect_id) return ftp_close($connect_id); } } + return true; } /** diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index f6d354d9431..17a0657dc0a 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -569,10 +569,12 @@ function dolJSToSetRandomPassword($htmlname, $htmlnameofbutton = 'generate_token { global $conf; + $out = ''; + if (!empty($conf->use_javascript_ajax)) { - print "\n".''; - print ''; + $out .= ''; } + + return $out; } diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 552881fd6cc..0c6d9932bca 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -394,7 +394,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print $langs->trans("WarningThemeForcedTo", $conf->global->MAIN_FORCETHEME); } - print '
'; + print '
'; $i = 0; foreach ($dirthemes as $dir) { @@ -470,7 +470,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; } - //Dark mode + // Dark mode if ($foruserprofile) { //Nothing } else { @@ -527,7 +527,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print '
'; if ($edit) { //print ajax_constantonoff('THEME_TOPMENU_DISABLE_IMAGE', array(), null, 0, 0, 1); - print $form->selectarray('THEME_TOPMENU_DISABLE_IMAGE', $listoftopmenumodes, isset($conf->global->THEME_TOPMENU_DISABLE_IMAGE)?$conf->global->THEME_TOPMENU_DISABLE_IMAGE:0); + print $form->selectarray('THEME_TOPMENU_DISABLE_IMAGE', $listoftopmenumodes, isset($conf->global->THEME_TOPMENU_DISABLE_IMAGE)?$conf->global->THEME_TOPMENU_DISABLE_IMAGE:0, 0, 0, 0, '', 0, 0, 0, '', 'widthcentpercentminusx maxwidth500'); } else { $listoftopmenumodes[$conf->global->THEME_TOPMENU_DISABLE_IMAGE]; //print yn($conf->global->THEME_TOPMENU_DISABLE_IMAGE);