]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/MobileProfile/MobileProfilePlugin.php
Don't redirect if mobile server is same as site server
[quix0rs-gnu-social.git] / plugins / MobileProfile / MobileProfilePlugin.php
index cd88a6f7b7383f7897bb06f8e55b659a3cb6492f..d854b6e5e3165af1aa48206bb37206f72651c970 100644 (file)
@@ -49,7 +49,7 @@ require_once INSTALLDIR.'/plugins/Mobile/WAP20Plugin.php';
 
 class MobileProfilePlugin extends WAP20Plugin
 {
-    public $DTD      = null;
+    public $DTD             = null;
     public $serveMobile     = false;
 
     function __construct($DTD='http://www.wapforum.org/DTD/xhtml-mobile10.dtd')
@@ -131,7 +131,9 @@ class MobileProfilePlugin extends WAP20Plugin
             // If they are okay with MP, and the site has a mobile server, 
             // redirect there
             if ($this->serveMobile && 
-                common_config('site', 'mobileserver') !== false) {
+                common_config('site', 'mobileserver') !== false &&
+                common_config('site', 'mobileserver') != 
+                    common_config('site', 'server')) {
 
                 header("Location: ".common_config('site', 'mobileserver'));
                 exit();
@@ -158,7 +160,9 @@ class MobileProfilePlugin extends WAP20Plugin
 
     function onStartShowAside($action)
     {
-
+        if ($this->serveMobile) {
+            return false;
+        }
     }