Apply validation feedback cleanup for language and XML/Steam files
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/b16096ca-4ef7-4bb0-80e8-658767561478 Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
fecad6b0d4
commit
33cbb13d1b
3 changed files with 7 additions and 10 deletions
|
|
@ -131,18 +131,14 @@ function ogp_load_english_fallbacks()
|
|||
|
||||
function ogp_include_lang_file_safely($filePath)
|
||||
{
|
||||
$previous = set_error_handler(function ($severity, $message) {
|
||||
set_error_handler(function ($severity, $message) {
|
||||
if ($severity === E_WARNING && strpos($message, 'already defined') !== false) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
include_once($filePath);
|
||||
if ($previous !== null) {
|
||||
restore_error_handler();
|
||||
} else {
|
||||
restore_error_handler();
|
||||
}
|
||||
restore_error_handler();
|
||||
}
|
||||
|
||||
function get_lang($lang_index)
|
||||
|
|
|
|||
|
|
@ -688,7 +688,9 @@ function config_games_render_top_level_editor($home_cfg_id, $configFile)
|
|||
}
|
||||
|
||||
echo "<h3>Section Editor</h3>";
|
||||
echo "<p class='note'>Edit one top-level section at a time. Validate a block before saving. Required sections cannot be removed. Optional sections can be added or removed safely.</p>";
|
||||
$sectionEditorNote = "Edit one top-level section at a time. Validate a block before saving. "
|
||||
. "Required sections cannot be removed. Optional sections can be added or removed safely.";
|
||||
echo "<p class='note'>{$sectionEditorNote}</p>";
|
||||
|
||||
if (!empty($optionalMissing)) {
|
||||
echo "<form class='xml-add-section' action='?m=config_games&home_cfg_id=" . (int)$home_cfg_id . "' method='post'>";
|
||||
|
|
|
|||
|
|
@ -269,9 +269,8 @@ function sw_sync_profiles($db)
|
|||
$safe_name = $db->realEscapeSingle($game_name);
|
||||
|
||||
$ok = $db->query(
|
||||
"INSERT IGNORE INTO " . sw_table('steam_workshop_game_profiles') . "
|
||||
(`config_name`, `game_name`, `enabled`)
|
||||
VALUES ('$safe_config', '$safe_name', 0)"
|
||||
"INSERT IGNORE INTO " . sw_table('steam_workshop_game_profiles') .
|
||||
" (`config_name`, `game_name`, `enabled`) VALUES ('$safe_config', '$safe_name', 0)"
|
||||
);
|
||||
if ($ok) {
|
||||
$created++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue