Add "Downgrade to previous version" selection

This commit is contained in:
bergware
2018-02-24 09:47:22 +01:00
parent 66ebbfe7c6
commit 6e0bc0caec
3 changed files with 49 additions and 9 deletions

View File

@@ -504,8 +504,11 @@ $(function() {
<?if (strpos(file_get_contents('/proc/cmdline'),'unraidsafemode')!==false):?>
showNotice('System running in <b>safe</b> mode');
<?else:?>
<?if (preg_match("/^\*\*REBOOT REQUIRED\!\*\*/",@file_get_contents("$docroot/plugins/unRAIDServer/README.md"))):?>
<?$readme = @file_get_contents("$docroot/plugins/unRAIDServer/README.md",false,null,0,20);?>
<?if (strpos($readme,'REBOOT REQUIRED')!==false):?>
showUpgrade('<b>Reboot required</b> to apply unRAID OS update');
<?elseif (strpos($readme,'DOWNGRADE')!==false):?>
showUpgrade('<b>Reboot required</b> to downgrade unRAID OS');
<?elseif ($version = plugin_update_available('unRAIDServer',true)):?>
showUpgrade('unRAID OS v<?=$version?> is available. <a>Download Now</a>','unRAIDServer');
<?endif;?>