View Issue Details

IDProjectCategoryView StatusLast Update
0008063mantisbtotherpublic2007-11-26 14:29
Reporterdeboutv Assigned Tojreese  
PrioritynormalSeveritymajorReproducibilityN/A
Status closedResolutionfixed 
Product Version1.1.0a3 
Fixed in Version1.1.0rc3 
Summary0008063: mantis_version shouldn't be in the configuration file
Description

The mantis version shouldn't be a configurable value of the Mantis core. It means that you can pretend to have another mantis version (with plugins depending on the mantis version...).

TagsNo tags attached.

Relationships

related to 0008609 new Because of (closed) "0008063: mantis_version shouldn't be in the configuration file" 

Activities

vboctor

vboctor

2007-06-20 20:50

manager   ~0014787

You have a point. This probably will only happen for the users who copy config_defaults_inc.php to config_inc.php and then edit. When they upgrade later the config_inc.php will include the old version and hence Mantis will display the wrong version number.

We should probably move this to somewhere like core.php or something. I don't have the source handy now, so will confirm that later.

jreese

jreese

2007-10-27 19:38

reporter   ~0016000

I think this would be much better as a define('MANTIS_VERSION') setting instead. This would be more consistent with the purpose, and people don't just edit core/constants_inc.php like they do the configuration.

giallu

giallu

2007-10-28 04:07

reporter   ~0016001

May I suggest adding a different define like PLUGIN_API_VERSION (or whatever the purpose of the variable is in the plugins)?

That way you can target exact versions of the API, don't need to adjust stuff on the plugins when the mantis version change without canging the API and, more in general, overloading semantics in the code is usually not wise.

jreese

jreese

2007-10-28 11:33

reporter   ~0016003

May I suggest adding a different define like PLUGIN_API_VERSION

I think for the most part, plugins will be more worried about targetting specific versions of Mantis to use specific features available. And since the version of Mantis would be another way of determining the plugin API version (it's not being developed independently), it seems to me a bit superfluous.

jreese

jreese

2007-10-28 11:43

reporter   ~0016004

I've committed this change to both 1.1.0rc3 and 1.2.0-CVS.

deboutv

deboutv

2007-10-29 04:04

reporter   ~0016017

Last edited: 2007-10-29 04:04

Is config_get( 'mantis_version' ) still work in the next release?

jreese

jreese

2007-11-26 14:29

reporter   ~0016295

deboutv: no. The preferred method is to now use the constant MANTIS_VERSION. See core/html_api.php and the Mantis footer for an example of how it is meant to be used.

Related Changesets

MantisBT: master b1352df9

2007-10-28 11:39

jreese


Details Diff
Fix 0008063: Move Mantis version setting out of the configuration settings.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@4672 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0008063
mod - core/html_api.php Diff File
mod - core/constant_inc.php Diff File
mod - config_defaults_inc.php Diff File

MantisBT: master-1.1.x 90a23116

2007-10-28 11:39

jreese


Details Diff
Fix 0008063: Move Mantis version setting out of the configuration settings.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/branches/BRANCH_1_1_0@4672 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0008063
mod - core/constant_inc.php Diff File
mod - core/html_api.php Diff File
mod - config_defaults_inc.php Diff File