/** * Uninstall a plugin from the database. * @param MantisPlugin $p_plugin Plugin basename. * @return void */ function plugin_uninstall(MantisPlugin $p_plugin) { access_ensure_global_level(config_get_global('manage_plugin_threshold')); if (!plugin_is_installed($p_plugin->basename) || plugin_protected($p_plugin->basename)) { return; } db_param_push(); $t_query = 'DELETE FROM {plugin} WHERE basename=' . db_param(); db_query($t_query, array($p_plugin->basename)); plugin_push_current($p_plugin->basename); $p_plugin->uninstall(); plugin_pop_current(); }
/** * Uninstall a plugin from the database. * @param MantisPlugin $p_plugin Plugin basename */ function plugin_uninstall($p_plugin) { access_ensure_global_level(config_get_global('manage_plugin_threshold')); if (!plugin_is_installed($p_plugin->basename) || plugin_protected($p_plugin->basename)) { return; } $t_plugin_table = db_get_table('plugin'); $t_query = "DELETE FROM {$t_plugin_table} WHERE basename=" . db_param(); db_query_bound($t_query, array($p_plugin->basename)); plugin_push_current($p_plugin->basename); $p_plugin->uninstall(); plugin_pop_current(); }