diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index a451982d859..6822ef3140c 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -858,12 +858,6 @@ parameters: count: 1 path: ../../../htdocs/admin/index.php - - - message: '#^Variable \$setupcompanynotcomplete in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../../htdocs/admin/index.php - - message: '#^Offset ''includerefgeneration'' on array\{label\: ''KnowledgeManagement'', includerefgeneration\: 1, includedocgeneration\: 0, class\: ''KnowledgeRecord''\} in empty\(\) always exists and is not falsy\.$#' identifier: empty.offset @@ -12162,12 +12156,6 @@ parameters: count: 1 path: ../../../htdocs/hrm/evaluation_list.php - - - message: '#^Variable \$setupcompanynotcomplete in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../../htdocs/hrm/index.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index 65c542ee637..cd426c52a6f 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -1,8 +1,8 @@ - * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2001-2004 Rodolphe Quiedeville + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2024-2025 Frédéric France * * 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 @@ -108,6 +108,8 @@ print '
'; if (!getDolGlobalString('MAIN_INFO_SOCIETE_NOM') || !getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY') || getDolGlobalString('MAIN_INFO_SOCIETE_SETUP_TODO_WARNING')) { $setupcompanynotcomplete = 1; +} else { + $setupcompanynotcomplete = 0; } print '
'; @@ -120,7 +122,7 @@ print $langs->trans("SetupDescription3b"); if (!empty($setupcompanynotcomplete)) { $langs->load("errors"); $warnpicto = img_warning($langs->trans("WarningMandatorySetupNotComplete"), 'style="padding-right: 6px;"'); - print '
'; + print '
'; } print ''; diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index 82731acd31d..239a3e67696 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -79,6 +79,8 @@ if ($user->socid > 0) { if (!getDolGlobalString('MAIN_INFO_SOCIETE_NOM') || !getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY')) { $setupcompanynotcomplete = 1; +} else { + $setupcompanynotcomplete = 0; } $max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT', 5); @@ -114,7 +116,7 @@ print load_fiche_titre($langs->trans("HRMArea"), '', 'hrm'); if (!empty($setupcompanynotcomplete)) { $langs->load("errors"); $warnpicto = img_warning($langs->trans("WarningMandatorySetupNotComplete")); - print '
'; + print '
'; llxFooter(); exit;