Make Berry Dash Launcher work again (not supported still)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
require __DIR__ . '/../../incl/util.php';
|
||||
setPlainHeader();
|
||||
echo "-1";
|
||||
echo "1.1.0";
|
||||
|
||||
18
database/launcher/versions.php
Normal file
18
database/launcher/versions.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
error_reporting(E_ALL); // Report all errors, warnings, and notices
|
||||
ini_set('display_errors', 1); // Display errors in the browser
|
||||
ini_set('display_startup_errors', 1);
|
||||
|
||||
require __DIR__ . '/../../incl/util.php';
|
||||
header("Content-Type: application/json");
|
||||
$conn = newConnection(0);
|
||||
|
||||
$stmt = $conn->prepare("SELECT * FROM launcherversionmanifest WHERE hidden = 0 AND game = 1 ORDER BY id DESC");
|
||||
$stmt->execute();
|
||||
|
||||
$result_versions = $stmt->get_result();
|
||||
$versions = array_map(fn($row) => ['id' => $row['id'], 'version' => $row['downloadUrlVersion'], 'displayName' => $row['downloadUrlVersion'], 'platforms' => json_decode($row['platforms']), 'downloadUrls' => json_decode(str_replace("%version%", $row["downloadUrlVersion"], $row["downloadUrls"])), 'executables' => json_decode($row['executables'])], $result_versions->fetch_all(MYSQLI_ASSOC));
|
||||
|
||||
echo json_encode($versions);
|
||||
|
||||
$conn->close();
|
||||
Reference in New Issue
Block a user