Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/OGSteam/ogspy into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
darknoon29 committed Apr 16, 2024
2 parents 081538e + ba8826c commit c374cc9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions includes/mod.php
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ function install_mod($mod_folder)
/**
* Function to uninstall an OGSpy Module
* @param string $mod_uninstall_name : Mod name
* @param string $mod_uninstall_table : Name of the Database table used by the Mod that we need to remove
* @param string|array $mod_uninstall_table : Name or list of Name of the Database table used by the Mod that we need to remove
* @api
*/
function uninstall_mod($mod_uninstall_name, $mod_uninstall_table = null)
Expand All @@ -671,7 +671,14 @@ function uninstall_mod($mod_uninstall_name, $mod_uninstall_table = null)

if ($mod_uninstall_table != null) {
//todo MOD factory ?
log_("debug", "DROP TABLE IF EXISTS " . $mod_uninstall_table);
if(is_array($mod_uninstall_table))
{
log_("debug", "DROP TABLE IF EXISTS " . implode(", ",$mod_uninstall_table));
}
else
{
log_("debug", "DROP TABLE IF EXISTS " . $mod_uninstall_table);
}
$Mod_Model->drop_custum_table($mod_uninstall_table);
}
}
Expand Down

0 comments on commit c374cc9

Please sign in to comment.