public function getAll($version, $oldLayout) { /* Default to DEV */ $versions = CompatibilityModel::getAllVersions(); if (!in_array($version, $versions)) { $version = 'DEV'; } /* Remove the current version from the versions array. */ if ($version != 'DEV') { $key = array_search($version, $versions); unset($versions[$key]); } $filename = DIR_COMPAT . "/compat-{$version}.xml"; $last_updated = date("F d, Y", @filemtime($filename)); $compat_data = CompatibilityModel::getAllData($version); $this->addCSSFiles(array('chart.css', 'compatibility.css')); return $this->renderPage(array('title' => "Compatibility - {$version}", 'content_title' => "{$version} Compatibility", 'version' => $version, 'compat_data' => $compat_data, 'last_updated' => $last_updated, 'versions' => $versions, 'old_layout' => $oldLayout, 'support_level_desc' => $this->_supportLevelDesc, 'support_level_class' => $this->_supportLevelClass), $this->_template); }
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 { $oldLayout = 'yes'; } if (!empty($target)) { return $this->getGame($target, $version, $oldLayout); } else { return $this->getAll($version, $versions, $oldLayout); } }