2016-12-07 19:05 EST

View Issue Details Jump to Notes ] Wiki ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0008063mantisbtotherpublic2007-11-26 14:29
Assigned Tojreese 
Product Version1.1.0a3 
Target VersionFixed in Version1.1.0rc3 
Summary0008063: mantis_version shouldn't be in the configuration file
DescriptionThe 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.
Attached Files

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



vboctor (manager)

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 (reporter)

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 (reporter)

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 (reporter)

> 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 (reporter)

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


deboutv (reporter)

Last edited: 2007-10-29 04:04

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



jreese (reporter)

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

-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 =>
+Issue History