chore: polish docs url constants and provisioning log clarity

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:53:29 +00:00 committed by GitHub
parent 05d7bfba78
commit a945b613ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 7 deletions

View file

@ -29,6 +29,10 @@ require_once("modules/config_games/server_config_parser.php");
require_once("includes/refreshed.php");
require_once('includes/lib_remote.php');
if (!defined('GSP_WEBSITE_DOCS_BASE_URL')) {
define('GSP_WEBSITE_DOCS_BASE_URL', 'https://gameservers.world/docs/');
}
function renderParam($param, $last_param, $param_access_enabled, $home_id)
{
global $db;
@ -156,7 +160,7 @@ function get_sync_name($server_xml)
function gsp_docs_url_for_game_key($game_key)
{
$baseDocsUrl = 'https://gameservers.world/docs';
$baseDocsUrl = rtrim(GSP_WEBSITE_DOCS_BASE_URL, '/');
$game_key = trim((string)$game_key);
if ($game_key !== '') {
$docPath = __DIR__ . '/../billing/docs/' . $game_key . '/index.php';
@ -273,7 +277,7 @@ $home_info = $db->getGameHomeWithoutMods($home_id);
$show_all = FALSE;
}
$docsTarget = 'https://gameservers.world/docs/';
$docsTarget = GSP_WEBSITE_DOCS_BASE_URL;
if (is_array($home_info) && !empty($home_info['game_key'])) {
$docsTarget = gsp_docs_url_for_game_key($home_info['game_key']);
}