]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix Regex for iPhone and add iPad 2386/head
authorLukas Reschke <lukas@statuscode.ch>
Mon, 28 Nov 2016 17:42:49 +0000 (18:42 +0100)
committerLukas Reschke <lukas@statuscode.ch>
Mon, 28 Nov 2016 17:42:49 +0000 (18:42 +0100)
The previous Regex worked for an iPhone with version "10.0" but not with "10.0.1" which was wrong. I modified the Regex to also match for those situations.

I also added a Regex for the iPad

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
settings/js/authtoken_view.js

index 518eb671b088591c0cee09b25b2154e423e6cb4f..0899b723b2a4ae3ae7428b4c7df4f4b143ecd003 100644 (file)
                                safari: /^Mozilla\/5\.0 \([^)]*(Windows|OS X)[^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\)(?: Version\/([0-9]+)[0-9.]+)? Safari\/[0-9.A-Z]+$/,
                                // Android Chrome user agent: https://developers.google.com/chrome/mobile/docs/user-agent
                                androidChrome: /Android.*(?:; (.*) Build\/).*Chrome\/(\d+)[0-9.]+/,
-                               iphone: / *CPU +iPhone +OS +(\d+)_\d+ +like +Mac +OS +X */,
+                               iphone: / *CPU +iPhone +OS +([0-9]+)_(?:[0-9_])+ +like +Mac +OS +X */,
+                               ipad: /\(iPad\; *CPU +OS +([0-9]+)_(?:[0-9_])+ +like +Mac +OS +X */,
                                iosClient: /^Mozilla\/5\.0 \(iOS\) ownCloud\-iOS.*$/,
                                androidClient:/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/,
                                // DAVdroid/1.2 (2016/07/03; dav4android; okhttp3) Android/6.0.1
                                chrome: t('setting', 'Google Chrome'),
                                safari: t('setting', 'Safari'),
                                androidChrome: t('setting', 'Google Chrome for Android'),
-                               iphone: t('setting', 'iPhone'),
+                               iphone: t('setting', 'iPhone iOS'),
+                               ipad: t('setting', 'iPad iOS'),
                                iosClient: t('setting', 'iOS Client'),
                                androidClient: t('setting', 'Android Client'),
                                davDroid: 'DAVdroid',