From 955c364e86655bea6988f7c7baa86453ae34fdea Mon Sep 17 00:00:00 2001 From: Tomasz Wolniewicz <twoln@umk.pl> Date: Mon, 22 Jan 2024 10:44:21 +0100 Subject: [PATCH] fixing the output format of edugain_status --- lib/API.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/API.php b/lib/API.php index be7d6df..3220e21 100644 --- a/lib/API.php +++ b/lib/API.php @@ -600,7 +600,7 @@ class API { when no federation code is present an array of code-indexed participating federations with details as described above' ], 'examples' => [ - ['opt' => ['only_errors'], 'title' => 'only fedrations with problems',], + ['opt' => ['only_errors'=>1,], 'title' => 'only fedrations with problems',], ['opt' => ['fed_id' => 'PIONIER-ID',],'title' => 'show status of PIONIER.Id',], ['opt' => ['fed_id' => 'PIONIER-ID',], 'format' => 'json', 'title' => 'show status of PIONIER.Id in JSON',] ] @@ -620,7 +620,7 @@ class API { } foreach ($edugain->FEDS as $fed) { if ($fed['feed_problem'] > 0 || $fed['valid_sec'] < $sec) { - $out[] = $fed; + $out[$fed['code']] = $fed; } } -- GitLab