From 30f660b05c1b4938b192f88574ec5f90dd0d3bf6 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 20 Nov 2009 02:12:09 +0000 Subject: Using common_redirect --- plugins/MobileProfile/MobileProfilePlugin.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'plugins/MobileProfile') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 9f8923396..c257f3fd8 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -63,9 +63,6 @@ class MobileProfilePlugin extends WAP20Plugin function onStartShowHTML($action) { - - - // XXX: This should probably graduate to WAP20Plugin // If they are on the mobile site, serve them MP @@ -162,8 +159,7 @@ class MobileProfilePlugin extends WAP20Plugin common_config('site', 'server'))) { // FIXME: Redirect to equivalent page on mobile site instead - header("Location: ".$this->_common_path('')); - exit(); + common_redirect($this->_common_path(''), 302); } } -- cgit v1.2.3-54-g00ecf From e1fcac0e0908be45c9aa7e840a6fcb2ca600eac5 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 20 Nov 2009 04:49:35 +0000 Subject: Changed DEFINE name to avoid conflicts --- plugins/MobileProfile/MobileProfilePlugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/MobileProfile') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index c257f3fd8..0b1e4de28 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -define('PAGE_TYPE_PREFS', +define('PAGE_TYPE_PREFS_MOBILEPROFILE', 'application/vnd.wap.xhtml+xml, application/xhtml+xml, text/html;q=0.9'); require_once INSTALLDIR.'/plugins/Mobile/WAP20Plugin.php'; @@ -172,7 +172,7 @@ class MobileProfilePlugin extends WAP20Plugin $_SERVER['HTTP_ACCEPT'] : null; $cp = common_accept_to_prefs($httpaccept); - $sp = common_accept_to_prefs(PAGE_TYPE_PREFS); + $sp = common_accept_to_prefs(PAGE_TYPE_PREFS_MOBILEPROFILE); $type = common_negotiate_type($cp, $sp); -- cgit v1.2.3-54-g00ecf