diff --git a/modules/modulemanager/module_handling.php b/modules/modulemanager/module_handling.php index d0b03993..b2cbe2af 100644 --- a/modules/modulemanager/module_handling.php +++ b/modules/modulemanager/module_handling.php @@ -205,6 +205,12 @@ function update_module($db, $module_id, $module) { if(isset($install_queries)) { + if (!array_key_exists($i+1, $install_queries)) + { + trigger_error("Module '" . preg_replace('/[^a-zA-Z0-9_\-]/', '', $module) . "': no migration queries defined for db_version step " . ($i+1) . " – skipping.", E_USER_NOTICE); + ++$i; + continue; + } foreach ((array)$install_queries[$i+1] as $query) { // Support PHP callables in addition to plain SQL strings. diff --git a/modules/steam_workshop/monitor_buttons.php b/modules/steam_workshop/monitor_buttons.php new file mode 100644 index 00000000..f0bce7e7 --- /dev/null +++ b/modules/steam_workshop/monitor_buttons.php @@ -0,0 +1,37 @@ +resultQuery( + "SELECT p.id + FROM OGP_DB_PREFIXsteam_workshop_game_profiles p + JOIN OGP_DB_PREFIXconfig_homes c ON c.game_key = p.config_name + JOIN OGP_DB_PREFIXserver_homes s ON s.home_cfg_id = c.home_cfg_id + WHERE s.home_id = " . (int)$server_home['home_id'] . " + AND p.enabled = 1 + LIMIT 1" +); + +if (!empty($_sw_profile)) { + $module_buttons[] = " + + Steam Workshop + "; +} + +unset($_sw_profile); +?> diff --git a/modules/steam_workshop/navigation.xml b/modules/steam_workshop/navigation.xml index 676d40f4..29a5deda 100644 --- a/modules/steam_workshop/navigation.xml +++ b/modules/steam_workshop/navigation.xml @@ -2,5 +2,5 @@ - + diff --git a/modules/steam_workshop/user.php b/modules/steam_workshop/user.php index a22e642f..97f9ce52 100644 --- a/modules/steam_workshop/user.php +++ b/modules/steam_workshop/user.php @@ -3,7 +3,7 @@ * GSP – Steam Workshop: User mod management * Copyright (C) 2025 WDS / GameServerPanel * - * Accessible via: home.php?m=steam_workshop&p=user_mods&home_id=123 + * Accessible via: home.php?m=steam_workshop&p=user&home_id=123 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -307,7 +307,7 @@ function sw_user_render($db, $home_id, array $home, array $profile) }); $params = sw_generate_launch_params(array_values($enabled_mods), $profile); - $base_url = 'home.php?m=steam_workshop&p=user_mods&home_id=' . $home_id; + $base_url = 'home.php?m=steam_workshop&p=user&home_id=' . $home_id; ?>