From: Michael J. Rubinsky Date: Fri, 12 Nov 2010 22:30:12 +0000 (-0500) Subject: Force mobile agents to the portal for now. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=5aa89f1aa0c99622e74309a02afeeff38a8946a1;p=horde.git Force mobile agents to the portal for now. Can revist this when we have more mobile apps, and a default-mobile-app pref. --- diff --git a/horde/index.php b/horde/index.php index ee798a9cf..a6b190f58 100644 --- a/horde/index.php +++ b/horde/index.php @@ -55,14 +55,18 @@ if ($main_page) { if (!$registry->getAuth()) { $main_page = Horde::url('login.php', true); } else { - /* Search for a user-specified initial application. */ + // Search for a user-specified initial application. + // Force mobile agents to the mobile portal, at least until we have + // a default mobile app pref. + if ($browser->isMobile()) { + Horde::getServiceLink('portal')->redirect(); + } + $initial_app = $prefs->getValue('initial_application'); if (!empty($initial_app) && ($initial_app != 'horde') && $registry->hasPermission($initial_app)) { $main_page = Horde::url($initial_app, true); - } elseif ($browser->isMobile()) { - $main_page = Horde::url('services/portal/mobile.php', true); } else { /* Next, try the initial horde page if it is something other than * index.php or login.php, since that would lead to inifinite @@ -72,7 +76,7 @@ if ($main_page) { $main_page = Horde::url($registry->applications['horde']['initial_page'], true); } else { /* Finally, fallback to the portal page. */ - $main_page = Horde::url('services/portal/', true); + $main_page = Horde::getServiceLink('portal'); } } }