mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 10:50:23 +01:00
Skip updatechecker if at least one of the three files is not present
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -1,8 +1,25 @@
|
||||
<?php
|
||||
|
||||
$versions = explode(" ", file_get_contents("/etc/pihole/localversions"));
|
||||
$branches = explode(" ", file_get_contents("/etc/pihole/localbranches"));
|
||||
$GitHubversions = explode(" ", file_get_contents("/etc/pihole/GitHubVersions"));
|
||||
$localversions = "/etc/pihole/localversions";
|
||||
$localbranches = "/etc/pihole/localbranches";
|
||||
$GitHubVersions = "/etc/pihole/GitHubVersions";
|
||||
|
||||
if(!is_readable($localversions) || !is_readable($localbranches) || !is_readable($GitHubVersions))
|
||||
{
|
||||
$core_branch = "master";
|
||||
$core_current = "N/A";
|
||||
$core_update = false;
|
||||
$web_branch = "master";
|
||||
$web_current = "N/A";
|
||||
$web_update = false;
|
||||
$FTL_current = "N/A";
|
||||
$FTL_update = false;
|
||||
goto endofupdatecheck;
|
||||
}
|
||||
|
||||
$versions = explode(" ", file_get_contents($localversions));
|
||||
$branches = explode(" ", file_get_contents($localbranches));
|
||||
$GitHubversions = explode(" ", file_get_contents($GitHubVersions));
|
||||
|
||||
/********** Get Pi-hole core branch / version / commit **********/
|
||||
// Check if on a dev branch
|
||||
@@ -62,4 +79,6 @@ else
|
||||
// The update indicator is only shown if the upstream version is NEWER
|
||||
$FTL_update = (version_compare($FTL_current, $FTL_latest) < 0);
|
||||
|
||||
endofupdatecheck:
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user