My proposal is:
To rename the Check for Updates Module to phpBB Updates or Software Updates to make it more appropriate to its contents and to have the following on the page.
- What is currently there
The latest and installed version, more information about the latest release, check for new update all of which is already there. - Four new automated updating options:
- Automatically upload the new download and install it
- Automatically upload the new download but wait for me to install it
- I want to update manually, just notify me for new updates
- Don't check for updates and update manually
- If option 2 is selected (or if option 1 is selected and the update failed) then an install update button
- If option 3 is selected a download update button appears
- Update Log (maybe a separate module)
A log of all updates with details on changes forced or were not done or when an update was not completed but started
Note: The numbers correspond to the aforementioned numbers for each option.
4 - Don't check for updates and update manually
This would stop the installation from checking the version check file on phpBB and therefore it can't automatically update.
3 - I want to update manually, just notify me for new updates
As it is now, just having the update check but not doing anything else automatically.
3 & 2 & 1 -
When it detects an update is avaliable it will generate a url to the download file using the latest version and the installed version (installed version from constants.php and the DB for security, if different just link to the general download page on phpBB or the release page/announcement) and find the automatic updater file (http://download.phpbb.com/pub/release/{ ... [b]{LATEST}[/b]/phpBB-{INSTALLED}_to_{LATEST}.zip - bold bits would change per release), the latest major version (e.g 3.1 or 3.2) could be added to the DB and constants file or it can just get the first 3 characters from the installed version. In option 3 this would then become the download link. In 1 and 2 see the next comment.
2 & 1 -
It will then download this version into a temp file and unpack it into the phpBB root and remove the temp file. For option 2 the button would now appear in the ACP.
2 - For 2 to work, it would need to instead of the install file disabling phpBB it would need to add a 'step' where it enables/disables the board. When installing phpBB for the first time the board would need to be preset to disabled (meaning this would probably need to be something in the files and not in the DB)?
1 -
It would then install automatically, then use this RFC and remove the install file as per this RFC. This will fail if there are mod conflicts but hopefully these should be rare after hooks implementation. (maybe it could be set to skip any changes that don't involve login or the acp (if it does involve login or the acp then it should fail just in case) and just notify the user in the acp?)
If any problems with the above occur it is shown as a blue message on the ACP similar to the could not check for updates message and full details are in the update log.
Thoughts?