From 7f8d8fe7e25834f1a96fa18ab1378cd21f8931ee Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 7 Jun 2018 20:21:12 +0200 Subject: [PATCH] Rename the new endpoint to "api.php?versions" and include also current and latest versions + current branches Signed-off-by: DL6ER --- api.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/api.php b/api.php index ade11750..f4221f30 100644 --- a/api.php +++ b/api.php @@ -73,7 +73,7 @@ elseif (isset($_GET['disable']) && $auth) } $data = array_merge($data, array("status" => "disabled")); } -elseif (isset($_GET['updatecheck'])) +elseif (isset($_GET['versions'])) { // Determine if updates are available for Pi-hole // using the same script that we use for the footer @@ -83,7 +83,19 @@ elseif (isset($_GET['updatecheck'])) $updates = array("core_update" => $core_update, "web_update" => $web_update, "FTL_update" => $FTL_update); + $current = array("core_current" => $core_current, + "web_current" => $web_current, + "FTL_current" => $FTL_current); + $latest = array("core_latest" => $core_latest, + "web_latest" => $web_latest, + "FTL_latest" => $FTL_latest); + $branches = array("core_branch" => $core_branch, + "web_branch" => $web_branch, + "FTL_branch" => $FTL_branch); $data = array_merge($data, $updates); + $data = array_merge($data, $current); + $data = array_merge($data, $latest); + $data = array_merge($data, $branches); } // Other API functions