From 7b4c1f4a0c2101b37d3cfcb7df5909517c11ab30 Mon Sep 17 00:00:00 2001 From: Mickael Veaudour Date: Tue, 5 Nov 2024 11:17:00 +0100 Subject: [PATCH] Afficher classe seulement s'il y a des bulletins --- libs/classes/Classe.lib.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/classes/Classe.lib.php b/libs/classes/Classe.lib.php index d320c55..06e4b02 100644 --- a/libs/classes/Classe.lib.php +++ b/libs/classes/Classe.lib.php @@ -35,6 +35,11 @@ class Classe { } public function haveBulletins(){ - return sizeof($this->bulletins) > 0; + foreach ($this->bulletins as $bulletin) { + if ( $bulletin->isVisible() ) { + return true; + } + return false; + } } } \ No newline at end of file