mirror of
https://github.com/pi-hole/web.git
synced 2026-04-25 19:29:20 +01:00
Rename the new endpoint to "api.php?versions" and include also current and latest versions + current branches
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
14
api.php
14
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
|
||||
|
||||
Reference in New Issue
Block a user