View Issue Details

IDProjectCategoryView StatusLast Update
0017355mantisbtplug-inspublic2014-12-08 02:08
Reporterdregad Assigned Todregad  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.0dev 
Target Version1.3.0-beta.1 
Summary0017355: Table names generated by plugin_table() are incorrect
Description

The function does not insert an underscore between $g_db_table_plugin_prefix and the plugins's name, i.e. we get mantis_pluginSnippets_snippet_table instead of mantis_plugin_Snippets_snippet_table

TagsNo tags attached.

Activities

dregad

dregad

2014-05-19 08:02

developer   ~0040572

This affects any instance having plugins that create tables, installed with or upgraded to version 1.3.x starting on commit fd5d371293ae94e8b9b1851291ca70ddad7c4ffa (committed to master on 2013-10-17T14:09:52 CEST).

dregad

dregad

2014-05-19 08:11

developer   ~0040573

Pull request https://github.com/mantisbt/mantisbt/pull/178

grangeway

grangeway

2014-06-01 17:28

reporter   ~0040706

Waiting merge

Related Changesets

MantisBT: master fade884e

2014-05-19 04:06

dregad


Details Diff
Make sure db prefix / suffix is consistently applied

Modifies the db_get_table() and plugin_table() functions to ensure that
we build a correct table name based on the user's config settings, e.g.

- trim leading/trailing whitespace
- do not add underscores if already present

Fixes 0017355, regression issue introduced by commit
5a84e9db76162e378b9a1b0dea129d1f7ce127e9 where plugin_table() no longer
inserts an underscore after $g_db_table_plugin_prefix
Affected Issues
0017355
mod - core/database_api.php Diff File
mod - core/plugin_api.php Diff File