Can we replace the hardcoded LTS version in the `isLTS` test with a mod test? If we are strictly sticking with the "every fourth release" starting from 1.19 is LTS then for any 1.x >= 1.19, if (x - 19) % 4 == 0 it is an LTS release. This does break down when the alpha will be an LTS though... maybe it is really not worth worrying about.
Compute LTS with mod math?
Please do :) The comment "-- yeah don't do this" was supposed to be an invitation for someone to improve it and implement it properly.
If I'm reading the past history correctly this should work fine when 1.31 enters beta as it will not be added to the
releases array until it is actually released.
LTS picks 1.27 instead of 1.23
Legoktm edited it to, apparently, make it so 1.27 is displayed as latest, but when an LTS is the latest version, the LTS displayed is the previous version, but this is not working, resulting in two 1.27 links in Download.
I made a fix for that issue in https://www.mediawiki.org/w/index.php?title=Module:Version&oldid=2175631 but then @Legoktm, @^demon, and I talked about it on irc and decided that 1.27 is the LTS that should be promoted. This is roughly in line with the way that Ubuntu promotes their LTS versions. Ubuntu 14.04 (Trusty) is still maintained, but the LTS links on the Ubuntu website now promote 16.04 (Xenial) which is the both the newest LTS and the current stable release. For us, 1.23 is the "Legacy LTS" for the next 12 months or so. It will continue to receive critical patches, but we really don't want anyone who is doing a new install or upgrading from an older version to an LTS to use it.
Ok, makes sense. Thanks for the reply
While it's fine to indicate that the "LTS" is the same as the main stable, the "legacy LTS" link should not be pointing to the latest stable release. The Download page refers to Legacy LTS in two places (the third link in the green download box, and in the Legacy releases section). Category:MediaWiki version information templates shows the four relevant templates.
I added support for a "legacylts" version that will pick the oldest LTS version. This will be 1.23.x until we drop support for that in 2017. It will then be the same as the LTS version until we have a newer LTS branch than 1.27.