feat: aligns shared page, php, & scripts + web components new location with api repo changes

This commit is contained in:
Zack Spear
2025-03-26 16:38:29 -07:00
parent 7b02adfa1d
commit e520da4a6a
17 changed files with 484 additions and 154 deletions

View File

@@ -115,7 +115,14 @@ class UnraidOsCheck
$params = [];
$params['branch'] = plugin('category', self::PLG_PATH, 'stable');
$params['current_version'] = plugin('version', self::PLG_PATH) ?: _var($var,'version');
// Get current version from patches.json if it exists, otherwise fall back to plugin version or var.ini
$patcherVersion = null;
if (file_exists('/tmp/Patcher/patches.json')) {
$patcherData = @json_decode(file_get_contents('/tmp/Patcher/patches.json'), true);
$patcherVersion = $patcherData['combinedVersion'] ?? null;
}
$params['current_version'] = $patcherVersion ?: plugin('version', self::PLG_PATH) ?: _var($var, 'version');
if (_var($var,'regExp')) $params['update_exp'] = date('Y-m-d', _var($var,'regExp')*1);
$defaultUrl = self::BASE_RELEASES_URL;
// pass a param of altUrl to use the provided url instead of the default
@@ -258,4 +265,4 @@ $isGetRequest = !empty($_SERVER) && isset($_SERVER['REQUEST_METHOD']) && $_SERVE
$getHasAction = $_GET !== null && !empty($_GET) && isset($_GET['action']);
if ($isGetRequest && $getHasAction) {
new UnraidOsCheck();
}
}

View File

@@ -13,6 +13,7 @@
?>
<?
$docroot ??= ($_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp');
require_once "$docroot/plugins/dynamix/include/ReplaceKey.php";
$replaceKey = new ReplaceKey();
$replaceKey->check();
@@ -22,4 +23,4 @@ parse_str(getenv('QUERY_STRING') ?? '', $_GET);
require_once "$docroot/plugins/dynamix.plugin.manager/include/UnraidCheck.php";
$unraidOsCheck = new UnraidOsCheck();
$unraidOsCheck->checkForUpdate();
$unraidOsCheck->checkForUpdate();