Skip to content

Commit 43467e1

Browse files
fix(cron): replace deprecated PHP variable interpolation syntax
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/8ae3bc81-3ffe-4b36-8c29-889fd220ffec Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
1 parent 924a82b commit 43467e1

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Panel/modules/cron/shared_cron_functions.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,17 +137,17 @@ function build_cron_scheduler_command($panelURL, $token, $game_home, $action) {
137137
$options['restart_delay_seconds'] = 60;
138138
}
139139
$options_json = urlencode(json_encode($options));
140-
return "wget -qO- \"${panelURL}/ogp_api.php?server_content/run_scheduled_action&token=${token}&home_id=${home_id}&action=${action}&options=${options_json}\" --no-check-certificate > /dev/null 2>&1";
140+
return "wget -qO- \"{$panelURL}/ogp_api.php?server_content/run_scheduled_action&token={$token}&home_id={$home_id}&action={$action}&options={$options_json}\" --no-check-certificate > /dev/null 2>&1";
141141
}
142142
switch ($action) {
143143
case "stop":
144-
return "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/stop&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
144+
return "wget -qO- \"{$panelURL}/ogp_api.php?gamemanager/stop&token={$token}&ip={$ip}&port={$port}&mod_key={$mod_key}\" --no-check-certificate > /dev/null 2>&1";
145145
case "start":
146-
return "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/start&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
146+
return "wget -qO- \"{$panelURL}/ogp_api.php?gamemanager/start&token={$token}&ip={$ip}&port={$port}&mod_key={$mod_key}\" --no-check-certificate > /dev/null 2>&1";
147147
case "restart":
148-
return "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/restart&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
148+
return "wget -qO- \"{$panelURL}/ogp_api.php?gamemanager/restart&token={$token}&ip={$ip}&port={$port}&mod_key={$mod_key}\" --no-check-certificate > /dev/null 2>&1";
149149
case "steam_auto_update":
150-
return "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/update&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}&type=steam\" --no-check-certificate > /dev/null 2>&1";
150+
return "wget -qO- \"{$panelURL}/ogp_api.php?gamemanager/update&token={$token}&ip={$ip}&port={$port}&mod_key={$mod_key}&type=steam\" --no-check-certificate > /dev/null 2>&1";
151151
}
152152
return false;
153153
}

0 commit comments

Comments
 (0)