View Issue Details

IDProjectCategoryView StatusLast Update
0010912mantisbtinstallationpublic2014-12-08 00:34
Reporterdhx Assigned Todhx  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Target Version1.3.0-beta.1Fixed in Version1.3.0-beta.1 
Summary0010912: Move code from admin/install.php to a new API file within core (and make plugins also use this API)
Description

Currently admin/install.php handles upgrades differently to how the plugin system handles them. It would be best if both the core Mantis product and all plugins could share the installation/upgrade codebase as much as possible.

I suggest a new core/install_api.php or something of that nature. The purpose of this API would be to perform upgrades of the database based on either the core schema, or the schema of a plugin.

TagsNo tags attached.

Relationships

related to 0010308 confirmed Need ability to specify MySQL administrator username/password to install plugins 

Activities

atrol

atrol

2014-01-26 17:20

developer   ~0039193

Setting to resolved as the issue which is described in summary is fixed by the attached commit.

To have "a new core/install_api.php or something of that nature" should be addressed in a new issue.

Related Changesets

MantisBT: master 4108aefa

2009-09-07 09:02

dhx


Details Diff
Issue 0010912: Move install functions to new install_helper_functions_api

This commit was created out of work towards converting the Timecard
plugin from using the datetime field to an integer field. This
conversion was carried out months ago to the MantisBT core.

An upgrade function named install_date_migrate was provided in
admin/install_functions.php and usually this isn't accessible to
plugins. Therefore install_functions.php and
install_helper_functions.php from the admin directory have been merged
together into a new install_helper_functions_api.php file. The aim of
this new API is to provide update functions that are useful for not just
the MantisBT core, but also to plugins that may want to perform updates
that are consistent with changes in the MantisBT core.

The date_migrate function should not call db_get_table because that
limits usage to core MantisBT code only. Therefore the schema has been
updated to use db_get_table, ensuring that date_migrate can be used by
plugins too.
Affected Issues
0010912
rm - admin/install_helper_functions.php Diff
mod - admin/schema.php Diff File