View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0008063 | mantisbt | other | public | 2007-06-15 03:40 | 2007-11-26 14:29 |
Reporter | deboutv | Assigned To | jreese | ||
Priority | normal | Severity | major | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 1.1.0a3 | ||||
Fixed in Version | 1.1.0rc3 | ||||
Summary | 0008063: 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...). | ||||
Tags | No tags attached. | ||||
related to | 0008609 | new | Because of (closed) "0008063: mantis_version shouldn't be in the configuration file" |
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. |
|
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. |
|
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. |
|
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. |
|
I've committed this change to both 1.1.0rc3 and 1.2.0-CVS. |
|
Is config_get( 'mantis_version' ) still work in the next release? |
|
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. |
|
MantisBT: master b1352df9 2007-10-28 11:39 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 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 |