diff --git a/modules/steam_workshop/agent_update_workshop.php b/modules/steam_workshop/agent_update_workshop.php index 5ac6b86e..84e4edd4 100644 --- a/modules/steam_workshop/agent_update_workshop.php +++ b/modules/steam_workshop/agent_update_workshop.php @@ -354,6 +354,9 @@ function sw_agent_steamcmd_download(array $mod, array $profile, array $tpl_vars, // Validate that steamcmd exists if (!$dry_run) { + if (!is_file($steamcmd)) { + return array('ok' => false, 'error' => "SteamCMD not found: $steamcmd"); + } if (!is_executable($steamcmd)) { return array('ok' => false, 'error' => "SteamCMD is not executable: $steamcmd"); } diff --git a/modules/steam_workshop/module.php b/modules/steam_workshop/module.php index d9368a56..b3261974 100644 --- a/modules/steam_workshop/module.php +++ b/modules/steam_workshop/module.php @@ -36,14 +36,19 @@ if (!function_exists('sw_module_db_prefix')) { if (!function_exists('sw_module_table')) { function sw_module_table($table) { - return '`' . sw_module_db_prefix() . $table . '`'; + return '`' . sw_module_table_name($table) . '`'; } } if (!function_exists('sw_module_table_name')) { function sw_module_table_name($table) { - return sw_module_db_prefix() . $table; + $prefix = preg_replace('/[^a-zA-Z0-9_]/', '', (string)sw_module_db_prefix()); + $name = preg_replace('/[^a-zA-Z0-9_]/', '', (string)$table); + if ($prefix === '') { + $prefix = 'gsp_'; + } + return $prefix . $name; } } diff --git a/modules/steam_workshop/user.php b/modules/steam_workshop/user.php index 174f1312..d57abb65 100644 --- a/modules/steam_workshop/user.php +++ b/modules/steam_workshop/user.php @@ -476,6 +476,14 @@ function sw_user_render($db, $home_id, array $home, array $profile) $mod): ?> + 70) + ? (substr($mod['last_error'], 0, 67) . '...') + : $mod['last_error']; + } + ?> @@ -518,7 +526,6 @@ function sw_user_render($db, $home_id, array $home, array $profile) ?> - 70 ? (substr($mod['last_error'], 0, 67) . '...') : $mod['last_error']) : ''; ?>