Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Wrong browser versions were used in the comparisons

  • Loading branch information...
commit 852f79f25a20e24d06624f57ea78c3ea99636989 1 parent ed2556f
Niels Leenheer authored
Showing with 3 additions and 22 deletions.
  1. +3 −22 backend/models/results.php
25 backend/models/results.php
View
@@ -40,7 +40,6 @@ function getByBrowser($browser, $version) {
LEFT JOIN scores AS s ON (b.variant = s.variant AND (b.version = s.version OR (b.version IS NULL AND s.version IS NULL)))
LEFT JOIN fingerprints AS f ON (f.fingerprint = s.fingerprint)
WHERE
- b.listed = 1 AND
s.release = '" . $version . "' AND
b.variant = '" . mysql_real_escape_string($browserVariant) . "' AND
b.version = '" . mysql_real_escape_string($browserVersion) . "'
@@ -49,6 +48,8 @@ function getByBrowser($browser, $version) {
if ($row = mysql_fetch_object($res)) {
return $row;
}
+
+ return;
}
else {
$browserVariant = $browser[0];
@@ -62,7 +63,6 @@ function getByBrowser($browser, $version) {
LEFT JOIN scores AS s ON (b.variant = s.variant AND (b.version = s.version OR (b.version IS NULL AND s.version IS NULL)))
LEFT JOIN fingerprints AS f ON (f.fingerprint = s.fingerprint)
WHERE
- b.listed = 1 AND
s.release = '" . $version . "' AND
b.variant = '" . mysql_real_escape_string($browserVariant) . "'
ORDER BY
@@ -71,26 +71,7 @@ function getByBrowser($browser, $version) {
if ($row = mysql_fetch_object($res)) {
return $row;
- }
-
- $res = mysql_query("
- SELECT
- b.variant, IFNULL(b.version,'') AS version, b.nickname, f.score, f.points, f.results
- FROM
- browserVersions AS b
- LEFT JOIN scores AS s ON (b.variant = s.variant AND (b.version = s.version OR (b.version IS NULL AND s.version IS NULL)))
- LEFT JOIN fingerprints AS f ON (f.fingerprint = s.fingerprint)
- WHERE
- b.listed = 1 AND
- s.release = '" . $version . "' AND
- b.unique = '" . mysql_real_escape_string($browserVariant) . "'
- ORDER BY
- b.release DESC, b.id DESC
- ");
-
- if ($row = mysql_fetch_object($res)) {
- return $row;
- }
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.