Hello Crew,
I personally can't see any reason why a module would have to be "upgraded" by clicking the little upgrade button... can someone enlighten me as to why?
Why not do an "automatic" upgrade the first time it's used?
So the question is... can anyone think of a way to do an "automatic" update of a module the first time it is used?
Thanks for the help!
Paul
Automatic Upgrade of modules
Re: Automatic Upgrade of modules
Well, I don't see any reason why automatic upgrades couldn't be done when the module is loaded at the beginning of the page display.
The only issue I could really see is that the module developer wants to display an upgrade message.
There is already a flag now that defaults to true that modules can override to turn off automatic upgrading. However, this only applies when you run the upgrade.php script. I suppose it coule work here as well...
The only issue I could really see is that the module developer wants to display an upgrade message.
There is already a flag now that defaults to true that modules can override to turn off automatic upgrading. However, this only applies when you run the upgrade.php script. I suppose it coule work here as well...
Re: Automatic Upgrade of modules
That's the reason! I knew there was one... but... i have to thank you.wishy wrote: Well, I don't see any reason why automatic upgrades couldn't be done when the module is loaded at the beginning of the page display.
The only issue I could really see is that the module developer wants to display an upgrade message.
There is already a flag now that defaults to true that modules can override to turn off automatic upgrading. However, this only applies when you run the upgrade.php script. I suppose it coule work here as well...
I'm working on something for my web hosting company to allow a central install of "CMS Made Simple" so they don't have to worry about the upgrades etc. The only issue is what to do about any module updates we put it. So this might solve our issue.
Here is my idea... along with the default install we'll create a php file called "upgrade_mod.php" that would have that autoupgrade function in it. Then when we do a module upgrade we can use a script or something to automatically do an "http fetch" against all the accounts that use that module so it would automatically upgrade their modules.
Or... do you think there is a better way?
Re: Automatic Upgrade of modules
I just committed a better way. 
Basically, if the module can auto upgrade itself, it will do it on the next page load. So, you could send it out to all of the installs and it'll "just work" next time a page is requested.
Basically, if the module can auto upgrade itself, it will do it on the next page load. So, you could send it out to all of the installs and it'll "just work" next time a page is requested.
Re: Automatic Upgrade of modules
But not all of them are? What could i do about the ones that aren't autoupgradeable?
Re: Automatic Upgrade of modules
A module has to deliberatly opt out of auto upgrade. It returns true by default. Most likely because it involves some kind of manual action that you probably couldn't script anyway...

