mirror of
https://github.com/pi-hole/web.git
synced 2026-04-25 11:19:59 +01:00
New check warnings logic
Changes: - Show warning message on docker, if a new image is available; - Never show the warning for Nightly or Dev images; - In docker, never show individual component update warnings; - simplified footer (logic moved to upgrade_checker file). Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
@@ -82,16 +82,30 @@ if (!is_readable($versionsfile)) {
|
||||
}
|
||||
|
||||
// URLs for the links
|
||||
$coreUrl = 'https://github.com/pi-hole/pi-hole';
|
||||
$dockerUrl = 'https://github.com/pi-hole/docker-pi-hole';
|
||||
$ftlUrl = 'https://github.com/pi-hole/FTL';
|
||||
$webUrl = 'https://github.com/pi-hole/AdminLTE';
|
||||
$coreReleasesUrl = $coreUrl.'/releases';
|
||||
$webReleasesUrl = $webUrl.'/releases';
|
||||
$ftlReleasesUrl = $ftlUrl.'/releases';
|
||||
$dockerReleasesUrl = $dockerUrl.'/releases';
|
||||
$coreUrl = 'https://github.com/pi-hole/pi-hole/releases';
|
||||
$webUrl = 'https://github.com/pi-hole/AdminLTE/releases';
|
||||
$ftlUrl = 'https://github.com/pi-hole/FTL/releases';
|
||||
$dockerUrl = 'https://github.com/pi-hole/docker-pi-hole/releases';
|
||||
|
||||
// Version strings
|
||||
$coreVersionStr = $core_current.(isset($core_commit) ? ' ('.$core_branch.', '.$core_commit.')' : '');
|
||||
$webVersionStr = $web_current.(isset($web_commit) ? ' ('.$web_branch.', '.$web_commit.')' : '');
|
||||
$ftlVersionStr = $FTL_current.(isset($FTL_commit) ? ' ('.$FTL_branch.', '.$FTL_commit.')' : '');
|
||||
// If "vDev" show branch/commit, else show link
|
||||
$coreVersionStr = $core_current;
|
||||
if (isset($core_commit)) {
|
||||
$coreVersionStr .= ' ('.$core_branch.', '.$core_commit.')';
|
||||
} else {
|
||||
$coreVersionStr = '<a href="'.$coreUrl.'/'.$core_current.'" rel="noopener" target="_blank">'.$core_current.'</a>';
|
||||
}
|
||||
|
||||
$webVersionStr = $web_current;
|
||||
if (isset($web_commit)) {
|
||||
$webVersionStr .= ' ('.$web_branch.', '.$web_commit.')';
|
||||
} else {
|
||||
$webVersionStr = '<a href="'.$webUrl.'/'.$web_current.'" rel="noopener" target="_blank">'.$web_current.'</a>';
|
||||
}
|
||||
|
||||
$ftlVersionStr = $FTL_current;
|
||||
if (isset($FTL_commit)) {
|
||||
$ftlVersionStr .= ' ('.$FTL_branch.', '.$FTL_commit.')';
|
||||
} else {
|
||||
$ftlVersionStr = '<a href="'.$ftlUrl.'/'.$FTL_current.'" rel="noopener" target="_blank">'.$FTL_current.'</a>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user