Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 529ef93

Browse files
committed
Hide Native App download panel on Windows Phone
1 parent 4ac3a3f commit 529ef93

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

core/src/core/classes/class.AJXP_Utils.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,6 +1487,16 @@ public static function userAgentIsIOS()
14871487
if (stripos($_SERVER["HTTP_USER_AGENT"], "ipod") !== false) return true;
14881488
return false;
14891489
}
1490+
/**
1491+
* Detect Windows Phone
1492+
* @static
1493+
* @return bool
1494+
*/
1495+
public static function userAgentIsWindowsPhone()
1496+
{
1497+
if (stripos($_SERVER["HTTP_USER_AGENT"], "IEMobile") !== false) return true;
1498+
return false;
1499+
}
14901500
/**
14911501
* Detect Android UA
14921502
* @static

core/src/plugins/gui.ios/class.IOSGuiPlugin.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ class IOSGuiPlugin extends AJXP_Plugin
3131
public function performChecks()
3232
{
3333
if(isSet($_SESSION["CURRENT_MINISITE"])) throw new Exception("Disabled for minisites");
34+
if(AJXP_Utils::userAgentIsWindowsPhone()){
35+
throw new Exception("No native app for windows phone");
36+
}
3437

3538
if (AJXP_Utils::userAgentIsIOS() && !isSet($_GET["skipIOS"]) && !isSet($_COOKIE["SKIP_IOS"])) {
3639
return;

0 commit comments

Comments
 (0)