|
@@ -29,9 +29,9 @@ $last_param = json_decode($server_home['last_param'], True);
|
|
|
$isAdmin = $db->isAdmin($_SESSION['user_id']);
|
|
$isAdmin = $db->isAdmin($_SESSION['user_id']);
|
|
|
|
|
|
|
|
if (!function_exists('processParamValue')) {
|
|
if (!function_exists('processParamValue')) {
|
|
|
- function processParamValue($paramKey, $paramValue){
|
|
|
|
|
|
|
+ function processParamValue($paramKey, $paramValue, &$save_param, &$start_cmd){
|
|
|
// Set globals
|
|
// Set globals
|
|
|
- global $save_param, $start_cmd, $param, $server_xml;
|
|
|
|
|
|
|
+ global $param, $server_xml;
|
|
|
|
|
|
|
|
if (0 == strlen($paramValue))
|
|
if (0 == strlen($paramValue))
|
|
|
return false;
|
|
return false;
|
|
@@ -468,7 +468,14 @@ elseif($server_home['home_id'] == $_POST['home_id'])
|
|
|
$dependsKey = str_replace("{DEPENDS:", "", $dependsSection);
|
|
$dependsKey = str_replace("{DEPENDS:", "", $dependsSection);
|
|
|
$dependsKey = str_replace("}", "", $dependsKey);
|
|
$dependsKey = str_replace("}", "", $dependsKey);
|
|
|
if(hasValue($_REQUEST['params'][$dependsKey])){
|
|
if(hasValue($_REQUEST['params'][$dependsKey])){
|
|
|
- $paramValue .= $_REQUEST['params'][$dependsKey];
|
|
|
|
|
|
|
+ $additionalValue = $_REQUEST['params'][$dependsKey];
|
|
|
|
|
+
|
|
|
|
|
+ // Remove leading slashes if there are any for additional game path
|
|
|
|
|
+ if($dependsKey == "other_game_server_path_additional"){
|
|
|
|
|
+ $additionalValue = ltrim($additionalValue,'/');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $paramValue .= $additionalValue;
|
|
|
}
|
|
}
|
|
|
$paramKey = $realKey;
|
|
$paramKey = $realKey;
|
|
|
}
|
|
}
|
|
@@ -486,7 +493,7 @@ elseif($server_home['home_id'] == $_POST['home_id'])
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Process the param value for the start command and for the save params
|
|
// Process the param value for the start command and for the save params
|
|
|
- processParamValue($paramKey, $paramValue);
|
|
|
|
|
|
|
+ processParamValue($paramKey, $paramValue, $save_param, $start_cmd);
|
|
|
|
|
|
|
|
$found++;
|
|
$found++;
|
|
|
break; // More efficient
|
|
break; // More efficient
|
|
@@ -495,7 +502,7 @@ elseif($server_home['home_id'] == $_POST['home_id'])
|
|
|
|
|
|
|
|
// If the parameter wasn't posted (because it may have been disabled due to access param) or a sneaky user deleted it to circumvent security
|
|
// If the parameter wasn't posted (because it may have been disabled due to access param) or a sneaky user deleted it to circumvent security
|
|
|
if($found == 0 && !empty($origValue)){
|
|
if($found == 0 && !empty($origValue)){
|
|
|
- processParamValue((string)$param['key'], $origValue);
|
|
|
|
|
|
|
+ processParamValue((string)$param['key'], $origValue, $save_param, $start_cmd);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if ($param['id'] != NULL && $param['id'] != ""){
|
|
if ($param['id'] != NULL && $param['id'] != ""){
|