Opened 17 years ago

Closed 17 years ago

Last modified 6 years ago

#8785 closed patch

WEB: Support for multiple versions in the compatibility page

Reported by: jvprat Owned by: fingolfin
Priority: normal Component: Web
Version: Keywords:
Cc: Game:

Description

I'm attaching a proposal for multiple versions support in the compatibility page. The idea is to put all the data of a release in a separate file, and include the file of the desired release. With this, a single code file can show several releases, and there's no more need for compatibility_stable.php.

When no version is specified, it selects the SVN version. Otherwise, if a file for the pointed release exists, it loads the data for that release. It also lists the available releases to access their compatibility lists.

In case it would be acceptable, what's the best place for the "data" files? Currently I've tested it with all the files in the same folder, but it would probably be better to have the compatibility data in a separate folder. What about include/compatibility?

I'm attaching the proposed php file and some release files as examples.

Ticket imported from: #1876140. Ticket imported from: patches/890.

Attachments (4)

compatibility.php (4.9 KB ) - added by jvprat 17 years ago.
Updated compatibility page
compat-SVN.inc (25.8 KB ) - added by jvprat 17 years ago.
Compatibility data for current SVN
compat-0.11.0.inc (25.8 KB ) - added by jvprat 17 years ago.
Compatibility data for release 0.11.0
compatibility.2.php (5.3 KB ) - added by jvprat 17 years ago.
Updated compatibility page v2

Download all attachments as: .zip

Change History (11)

by jvprat, 17 years ago

Attachment: compatibility.php added

Updated compatibility page

by jvprat, 17 years ago

Attachment: compat-SVN.inc added

Compatibility data for current SVN

comment:1 by jvprat, 17 years ago

File Added: compat-SVN.inc

by jvprat, 17 years ago

Attachment: compat-0.11.0.inc added

Compatibility data for release 0.11.0

comment:2 by jvprat, 17 years ago

File Added: compat-0.11.0.inc

comment:3 by fingolfin, 17 years ago

Nice idea. However, the value of the 'version' GET variable should be filtered, to avoid cracking. e.g. limit it to len < 10 and only a limited set of chars, like [A-Za-z0-9.]

by jvprat, 17 years ago

Attachment: compatibility.2.php added

Updated compatibility page v2

comment:4 by jvprat, 17 years ago

Here's an updated version with the changes you proposed. Now it also shows the modification date of the data file, not the code file, and it allows easier navigation from version to version. File Added: compatibility.php

comment:5 by fingolfin, 17 years ago

Status: newclosed

comment:6 by fingolfin, 17 years ago

Good work, added to SVN.

comment:7 by digitall, 6 years ago

Component: Web
Note: See TracTickets for help on using tickets.