fix: external docs links and automatic install retry provisioning

Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/020b5f73-a6ca-4a45-a4cb-eeef59cb26a8

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-05-09 00:51:36 +00:00 committed by GitHub
parent e0fdb8cdd2
commit 83f97dda20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 261 additions and 9 deletions

View file

@ -156,14 +156,15 @@ function get_sync_name($server_xml)
function gsp_docs_url_for_game_key($game_key)
{
$baseDocsUrl = 'https://gameservers.world/docs';
$game_key = trim((string)$game_key);
if ($game_key !== '') {
$docPath = __DIR__ . '/../billing/docs/' . $game_key . '/index.php';
if (is_file($docPath)) {
return '/docs.php?action=view&doc=' . rawurlencode($game_key);
return $baseDocsUrl . '/' . rawurlencode($game_key) . '/';
}
}
return '/docs.php';
return $baseDocsUrl . '/';
}
function exec_ogp_module() {
@ -272,7 +273,7 @@ $home_info = $db->getGameHomeWithoutMods($home_id);
$show_all = FALSE;
}
$docsTarget = '/docs.php';
$docsTarget = 'https://gameservers.world/docs/';
if (is_array($home_info) && !empty($home_info['game_key'])) {
$docsTarget = gsp_docs_url_for_game_key($home_info['game_key']);
}