SMF bug 4839 (hooks not cleared after an upgrade)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
SMF bug 4839 (hooks not cleared after an upgrade)
« on February 29th, 2012, 01:44 PM »
This is potentially a tricky one to contend with, and I'm wary of how exactly automated this should be - even with all the safeguards normally put in place in the plugin manager.

What I would probably have the upgrader do is disable all plugins (going through the same steps as DisablePlugin() does), and then let the admin re-enable them afterwards - especially since a plugin may no longer function if it depends on a hook that is subsequently altered (e.g. we change its signature, so we should rename it to enforce authors version check properly)
Re: SMF bug 4839 (hooks not cleared after an upgrade)
« Reply #1, on August 23rd, 2013, 09:28 PM »
I saw that 2.1's upgrade actually fixes this.

But in our case, yeah essentially that's what it would be, call DisablePlugin for all plugins before the upgrade was carried out, then perform the upgrade.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial