MyBB Community Forums

Full Version: support for plugin upgrades
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It would be nice if we could get support for plugin upgrades.

1) add to array key "version" to the "plugins" cache so that any installed (active or not) is listed as the "key" with the version as the "value"

example:
plugins['active']['helloworld']="helloworld"
plugins['version']['helloworld']="1.0.0"

2) add support to run an upgrade function from the ACP >> Plugins page

example:
Deactivate - Uninstall - Upgrade

and choosing Upgrade would run plugin_upgrade() so we can compare the version from the plugins cache to the version in plugin_info() and run the appropriate upgrade code.

once the plugin_upgrade() code is finished, MyBB would then update the plugin cache to the new version number from plugin_info()
You can make this happen already, just create a new cache; someone else made a thread about this a while ago, and I still agree it'd be good to have this default. The reason hardly anybody has upgrade functions (from what I've seen anyway) is probably because people don't realise how to do it, if it was handled by default, more people would do it.
I just think that default support for upgrades would help plugin authors and users in the long run. I'd like to see this feature in future versions.
It'd be nice for it to have it as default.
well since it will not make it into 1.6.1 and maybe not into 2.0, I am starting to use the method I posted here: http://community.mybb.com/thread-83029.html