[Scummvm-cvs-logs] scummvm-web master -> 64bfa6e644646e8e6a1058d0dd7ed046f34b539e
sev-
sev at scummvm.org
Tue Mar 1 23:11:01 CET 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm-web' repo located at https://github.com/scummvm/scummvm-web .
Summary:
64bfa6e644 WEB: Really fix referring to non-existent compatibility versions
Commit: 64bfa6e644646e8e6a1058d0dd7ed046f34b539e
https://github.com/scummvm/scummvm-web/commit/64bfa6e644646e8e6a1058d0dd7ed046f34b539e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-03-01T23:10:29+01:00
Commit Message:
WEB: Really fix referring to non-existent compatibility versions
Changed paths:
include/Pages/CompatibilityPage.php
diff --git a/include/Pages/CompatibilityPage.php b/include/Pages/CompatibilityPage.php
index 1a5419a..de16976 100644
--- a/include/Pages/CompatibilityPage.php
+++ b/include/Pages/CompatibilityPage.php
@@ -38,6 +38,13 @@ class CompatibilityPage extends Controller {
public function index() {
$version = (!empty($_GET['v']) ? $_GET['v'] : 'DEV');
$target = $_GET['t'];
+
+ /* Default to DEV */
+ $versions = CompatibilityModel::getAllVersions();
+ if (!in_array($version, $versions)) {
+ $version = 'DEV';
+ }
+
if ($version === 'DEV' || (CompatibilityModel::compareVersions($version, COMPAT_LAYOUT_CHANGE) >= 0)) {
$oldLayout = 'no';
} else {
@@ -47,7 +54,7 @@ class CompatibilityPage extends Controller {
if (!empty($target)) {
return $this->getGame($target, $version, $oldLayout);
} else {
- return $this->getAll($version, $oldLayout);
+ return $this->getAll($version, $versions, $oldLayout);
}
}
@@ -72,12 +79,7 @@ class CompatibilityPage extends Controller {
}
/* We should show all the compatibility stats for a specific version. */
- public function getAll($version, $oldLayout) {
- /* Default to DEV */
- $versions = CompatibilityModel::getAllVersions();
- if (!in_array($version, $versions)) {
- $version = 'DEV';
- }
+ public function getAll($version, $versions, $oldLayout) {
/* Remove the current version from the versions array. */
if ($version != 'DEV') {
$key = array_search($version, $versions);
More information about the Scummvm-git-logs
mailing list