Skip to content

[ticket/9871] Update version check file to use JSON format #2000

Closed
wants to merge 1 commit into from

3 participants

@EXreaction

This PR requires a versions.json file be added to version.phpbb.com/phpbb/ with the following format:

{"30x":{"current":"3.0.12","announcement":"https:\/\/www.phpbb.com\/community\/viewtopic.php?f=14&t=2200921"},"30x_qa":{"current":"3.0.12","announcement":"https:\/\/www.phpbb.com\/community\/viewtopic.php?f=14&t=2200921"}}
@bantu
phpBB Forum Software member
bantu commented Feb 19, 2014

Mabye the JSON file should contain a "stable" array and a "qa" array. Each array contains arrays containing a version number and a link. Depending on the qa constant, either the first array is used or the second. All versions are presented to the user, somehow. This way, we can easily add 3.2.x.

@naderman
phpBB Forum Software member

Yup makes sense.

@bantu
phpBB Forum Software member
bantu commented Feb 19, 2014

The client (board) checks for each given version whether it is larger than the currently installed version such that all larger versions can be displayed.

@naderman
phpBB Forum Software member
@bantu
phpBB Forum Software member
bantu commented Feb 19, 2014

The 3.0.x version check can be changed as follows: Foreach group of two lines, the first line is interpreted as a version number, the second is interpreted as a link. The qa constant determines which filename to use.

@bantu
phpBB Forum Software member
bantu commented Feb 19, 2014

It might be even wiser to keep using different files. Most of our users don't need the QA information.

@EXreaction

Should probably be discussed in an RFC. The format is dependent on how we want to display update information to the user. Do we display multiple stable releases they could update to? Do we list qa/pre-release releases for some set of users?

@naderman
phpBB Forum Software member

I don't think it matters if we have them download a few extra bytes, also don't think we really need an RFC for this, what we need is pretty straight forward?

@EXreaction

Do we display multiple stable releases they could update to?

@naderman
phpBB Forum Software member

Yes I would do that if possible.

@naderman
phpBB Forum Software member

I also updated the json file again to make the versions version_compare'able so you can see which ones are newer properly

@EXreaction

I've made a new PR that handles things much better: #2048

@EXreaction EXreaction closed this Feb 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.