View Issue Details

IDProjectCategoryView StatusLast Update
0008063mantisbtotherpublic2007-11-26 14:29
ReporterdeboutvAssigned Tojreese 
PrioritynormalSeveritymajorReproducibilityN/A
Status closedResolutionfixed 
Product Version1.1.0a3 
Target VersionFixed 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 15:39:31

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
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 15:39:31

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
mod - core/constant_inc.php Diff File
mod - core/html_api.php Diff File
mod - config_defaults_inc.php Diff File

Issue History

Date Modified Username Field Change
2007-06-15 03:40 deboutv New Issue
2007-06-20 20:50 vboctor Note Added: 0014787
2007-06-20 20:50 vboctor Status new => confirmed
2007-10-27 19:38 jreese Note Added: 0016000
2007-10-28 02:27 vboctor Status confirmed => assigned
2007-10-28 02:27 vboctor Assigned To => jreese
2007-10-28 04:07 giallu Note Added: 0016001
2007-10-28 11:33 jreese Note Added: 0016003
2007-10-28 11:43 jreese Status assigned => resolved
2007-10-28 11:43 jreese Fixed in Version => 1.1.0rc3
2007-10-28 11:43 jreese Resolution open => fixed
2007-10-28 11:43 jreese Note Added: 0016004
2007-10-29 04:04 deboutv Note Added: 0016017
2007-10-29 04:04 deboutv Note Edited: 0016017
2007-11-23 19:00 vboctor Status resolved => closed
2007-11-26 09:58 giallu Relationship added related to 0008609
2007-11-26 14:29 jreese Note Added: 0016295
2008-10-20 20:21 Changeset attached master-1.1.x e1596f96 =>
2008-10-21 11:48 Changeset attached master efa455cc =>
2008-11-11 08:35 jreese Changeset attached master b1352df9 =>
2008-11-11 08:48 jreese Changeset attached master b1352df9 =>
2008-11-11 09:04 jreese Changeset attached master-1.1.x 90a23116 =>