Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for custom download server in WordPress install script
- Loading branch information
Showing
1 changed file
with
32 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7e48650
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert this PR ... there is no need to support all those different Wordpress versions, as out general policy is to support only the newest version from each major release. Also this breaks detection for new versions, which you can see by running "virtualmin check-scripts --debug wordpress"
Also, instead of prompting the user for whether to use a mirror or not, we should just re-run
wp download
with the Virtualmin mirror URL if the first download fails.Also also, I don't see the point of checking
$config{'wp_download_server'}
?7e48650
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duh, you're right! Adding an extra option was overkill. Not sure why I didn't just make the script retry silently and only fail if both downloads failed! Alright, it's fixed now! Thanks!
I added the
wp_aux_download_server
option for users to be able to define a custom auxiliary download server for development purposes! It will be possible to define it later from the WordPress Kit.Alright, I have fixed it to only have major releases listed.
Hmm, I'm not sure I understand the logic or what's failing really? All those versions that were out there are legitimate releases that a user could use for development purposes. But it's okay to have only major releases in the main list, as I will make this later possible from inside WordPress Kit.
7e48650
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! But can you also fix the
script_wordpress_latest
function to properly handle these new versions?You can see that if you run
virtualmin check-scripts --debug wordpress
currently it will complain that version 5.9.9 (and others) are not the newest.7e48650
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this #795.
7e48650
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That only works if we know for sure that 5.9.9 will be the final version in the 5.9 series, which for some scripts is not the case.
7e48650
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But in case of my patch it won't complain and only check the version 6? Ideally we should check for only the latest version from
_versions
func, though I'm not sure how it can be done from inside_latest
?7e48650
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually you're right, the latest patch is good!