diff --git a/actions/NotesAction.php b/actions/NotesAction.php index 68ff53d..5c9e437 100644 --- a/actions/NotesAction.php +++ b/actions/NotesAction.php @@ -14,7 +14,12 @@ class NotesAction extends YesWikiAction public function run() { - $noteManager = $this->getService(NoteManager::class); - return $noteManager->viewBulletins(); + try { + $noteManager = $this->getService(NoteManager::class); + return $noteManager->viewBulletins(); + } catch (Exception $e) { + return 'Exception reçue : '.$e->getMessage()."\n"; + } + } } diff --git a/libs/bulletin/Bulletin.lib.php b/libs/bulletin/Bulletin.lib.php index ae4c7fd..1b035bd 100644 --- a/libs/bulletin/Bulletin.lib.php +++ b/libs/bulletin/Bulletin.lib.php @@ -18,8 +18,9 @@ class Bulletin { $listManager = $wiki->services->get(ListManager::class); $matieres = $listManager->getOne('ListeMatiere'); // echo "

".var_dump($matieres)."

"; - foreach ($matieres['nodes'] as $matiere) { - $this->matieres[] = new Matiere($wiki, $this, $matiere["id"], $matiere["label"]); + foreach ($matieres['label'] as $id => $matiere) { + // echo "

".$id.""; + $this->matieres[] = new Matiere($wiki, $this, $id, $matiere); } }