Upload via GUI (364 Dateien)

This commit is contained in:
2026-11-01 11:15:37 +00:00
parent 0945d61744
commit 9b1b7c0d6e
8 changed files with 262 additions and 27 deletions
+3 -1
View File
@@ -16,6 +16,8 @@ function app_platforms(): array
'windows' => ['label' => 'Windows', 'ext' => 'exe', 'stored' => 'DeskHub-Setup.exe', 'download' => 'DeskHub-Setup.exe', 'magic' => 'MZ', 'mime' => 'application/vnd.microsoft.portable-executable'],
'android' => ['label' => 'Android', 'ext' => 'apk', 'stored' => 'DeskHub.apk', 'download' => 'DeskHub.apk', 'magic' => 'PK', 'mime' => 'application/vnd.android.package-archive'],
'minecraft' => ['label' => 'Minecraft', 'ext' => 'jar', 'stored' => 'DeskHub-Minecraft.jar', 'download' => 'DeskHub-Minecraft.jar', 'magic' => 'PK', 'mime' => 'application/java-archive'],
'wordpress' => ['label' => 'WordPress', 'ext' => 'zip', 'stored' => 'deskhub-tickets-wordpress.zip', 'download' => 'deskhub-tickets-wordpress.zip', 'magic' => 'PK', 'mime' => 'application/zip'],
'chrome' => ['label' => 'Chrome', 'ext' => 'zip', 'stored' => 'deskhub-chrome-erweiterung.zip', 'download' => 'deskhub-chrome-erweiterung.zip', 'magic' => 'PK', 'mime' => 'application/zip'],
];
}
@@ -27,7 +29,7 @@ function app_downloads_dir(): string
/** Official publisher release endpoint; the access key stays on the server. */
function app_publisher_endpoint(string $platform, bool $download = false): string
{
if (!in_array($platform, ['android', 'windows', 'minecraft'], true) || !function_exists('catalog_defaults')) return '';
if (!isset(app_platforms()[$platform]) || !function_exists('catalog_defaults')) return '';
$base = (string) (catalog_defaults()['plugins_url'] ?? '');
$parts = parse_url($base);
if (!$parts || ($parts['scheme'] ?? '') !== 'https' || empty($parts['host'])) return '';