[Scummvm-git-logs] scummvm-web master -> 2015d340b30961138127b75f68b473a6f84d1dc6
Mataniko
mataniko at gmail.com
Thu May 9 05:52:48 CEST 2019
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:
2015d340b3 WEB: Add new recommended download UAs
Commit: 2015d340b30961138127b75f68b473a6f84d1dc6
https://github.com/scummvm/scummvm-web/commit/2015d340b30961138127b75f68b473a6f84d1dc6
Author: Matan Bareket (mataniko at gmail.com)
Date: 2019-05-08T23:52:36-04:00
Commit Message:
WEB: Add new recommended download UAs
Changed paths:
data/downloads.xml
include/Pages/DownloadsPage.php
diff --git a/data/downloads.xml b/data/downloads.xml
index 15706de..fba342c 100644
--- a/data/downloads.xml
+++ b/data/downloads.xml
@@ -41,6 +41,7 @@
<category_icon>fedora</category_icon>
<url>scummvm-{$release}-1.x86_64.rpm</url>
<name>Fedora 24+ x86 64bit package</name>
+ <user_agent>Fedora</user_agent>
</file>
<file>
@@ -52,6 +53,7 @@
<category_icon>debian</category_icon>
<url>scummvm_{$release}-stretch.1_amd64.deb</url>
<name>Debian 9 (stretch) x86 64bit package</name>
+ <user_agent>Debian</user_agent>
</file>
<!--
<file>
@@ -140,6 +142,7 @@
<category_icon>psp2</category_icon>
<url>scummvm-{$release}-vita.vpk</url>
<name>PlayStation Vita package</name>
+ <user_agent>PlayStation Portable</user_agent>
</file>
<file>
<category_icon>android</category_icon>
@@ -212,7 +215,7 @@
<category_icon>iphone</category_icon>
<url>scummvm-{$release}-ios7.deb</url>
<name>iOS 7+ package</name>
- <user_agent>like Mac OS X</user_agent>
+ <user_agent>iOS</user_agent>
</file>
<file>
<category_icon>webos</category_icon>
@@ -558,7 +561,7 @@
<category_icon>iphone</category_icon>
<url>1.9.0/scummvm-1.9.0-ios7.deb</url>
<name>1.9.0 iOS 7+ package</name>
- <user_agent>like Mac OS X</user_agent>
+ <user_agent>iOS</user_agent>
</file>
<file>
<category_icon>gcw0</category_icon>
diff --git a/include/Pages/DownloadsPage.php b/include/Pages/DownloadsPage.php
index 0386143..bf932a6 100644
--- a/include/Pages/DownloadsPage.php
+++ b/include/Pages/DownloadsPage.php
@@ -28,12 +28,14 @@ class DownloadsPage extends Controller
foreach ($downloads as $dsection) {
foreach ($dsection->getSubSections() as $dsubsection) {
- $version = array_filter(
- $dsubsection->getItems(), function ($item) use ($os) {
- if ($item->getUserAgent() != "") {
- return preg_match("/({$item->getUserAgent()})/i", $os['name']);
+ $version = array_values(
+ array_filter(
+ $dsubsection->getItems(), function ($item) use ($os) {
+ if ($item->getUserAgent() != "") {
+ return preg_match("/({$item->getUserAgent()})/i", $os['name']);
+ }
}
- }
+ )
);
if ($version) {
More information about the Scummvm-git-logs
mailing list