diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2010-02-26 12:54:51 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2010-02-26 12:54:51 (GMT) |
commit | 7a09b2142cccbf3019986294442a7278cad135bb (patch) | |
tree | 544fd100201f61d248db1cbca419a3d15d67ee5c /site/app/models/file.php | |
parent | 946c9395e946cfd30f71c94217fc2637ed6c7d75 (diff) |
Add SP version to memcache keyv4
Diffstat (limited to 'site/app/models/file.php')
-rw-r--r-- | site/app/models/file.php | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/site/app/models/file.php b/site/app/models/file.php index 1041f5d..dc02aaa 100644 --- a/site/app/models/file.php +++ b/site/app/models/file.php @@ -85,18 +85,7 @@ class File extends AppModel function getLatestFileByAddonId($addon_id, $platform_id = null) { // Platform WHERE if necessary $platform = !empty($platform_id) ? " AND (File.platform_id = ".PLATFORM_ALL." OR File.platform_id = {$platform_id})" : ''; - - if (preg_match('/OLPC\/0\.([^-]*)-/', env('HTTP_USER_AGENT'), $matches)) { - if (floatval($matches[1]) <= 4.6) - $sp = '0.82'; - else - $sp = '0.84'; - } else { - if (preg_match('/Sugar Labs\/([0-9]+)\.([0-9]+)/', env('HTTP_USER_AGENT'), $matches)) - $sp = $matches[1].'.'.$matches[2]; - else - $sp = SITE_SUGAR_STABLE; - } + $sp = parse_sp(); $sql = " SELECT |