diff --git a/emhttp/plugins/dynamix.plugin.manager/Update.page b/emhttp/plugins/dynamix.plugin.manager/Update.page
index d4ba5ef5f..93c7a12e6 100644
--- a/emhttp/plugins/dynamix.plugin.manager/Update.page
+++ b/emhttp/plugins/dynamix.plugin.manager/Update.page
@@ -13,47 +13,48 @@ Tag="upload"
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
+ *
+ *
+ * If /boot/previous/bzroot exists, then the user has the option to downgrade to the previous version.
+ * Parse the text file /boot/previous/changes.txt to get the version number of the previous version.
+ * Then we move some file around and reboot.
*/
?>
-$version = $branch = $date = _('unknown');
-$bzroot = file_exists('/boot/previous/bzroot');
-$check = $notify['unraidos'] ? 0 : 1;
-$changes = '/boot/previous/changes.txt';
-$zip = htmlspecialchars(str_replace(' ','_',strtolower($var['NAME'])));
+$check = $notify['unraidos'] ? 0 : 1;
-if (file_exists($changes)) {
- exec("head -n4 $changes",$rows);
+$restoreVersion = $restoreBranch = $restoreVersionReleaseDate = 'unknown';
+$restoreExists = file_exists('/boot/previous/bzroot');
+$restoreChangelogPath = '/boot/previous/changes.txt';
+
+$diagnosticsZip = htmlspecialchars(str_replace(' ', '_', strtolower($var['NAME'])));
+
+if (file_exists($restoreChangelogPath)) {
+ exec("head -n4 $restoreChangelogPath", $rows);
foreach ($rows as $row) {
$i = stripos($row,'version');
if ($i !== false) {
- [$version,$date] = explode(' ',trim(substr($row,$i+7)));
+ [$restoreVersion, $restoreVersionReleaseDate] = explode(' ', trim(substr($row, $i+7)));
break;
}
}
- $branch = strpos($version,'rc')!==false ? _('Next') : (strpos($version,'beta')!==false ? _('Beta') : _('Stable'));
+ $restoreBranch = strpos($restoreVersion, 'rc') !== false
+ ? _('Next')
+ : (strpos($restoreVersion, 'beta') !== false
+ ? _('Beta')
+ : _('Stable'));
}
-$reboot = preg_match("/^\*\*(REBOOT REQUIRED|DOWNGRADE)/",@file_get_contents("$docroot/plugins/unRAIDServer/README.md",false,null,0,20));
?>
-
+
+
| _(Component)_ | _(Author)_ | _(Version)_ | _(Status)_ | _(Branch)_ | |
|---|---|---|---|---|---|
![]() | _(Unraid OS)_ (_(previous)_) | LimeTech | =$version?> | =$branch?> | |