← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11854: fixed minor redirect bug

 

------------------------------------------------------------
revno: 11854
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-09-02 08:55:31 +0200
message:
  fixed minor redirect bug
modified:
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/MappedRedirectStrategy.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/MappedRedirectStrategy.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/MappedRedirectStrategy.java	2013-08-30 10:36:36 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/MappedRedirectStrategy.java	2013-09-02 06:55:31 +0000
@@ -92,15 +92,15 @@
         String mobileVersion = (String) request.getAttribute( "mobileVersion" );
         mobileVersion = mobileVersion == null ? "desktop" : mobileVersion;
 
-        if ( mobileVersion.equals( "basic" ) )
+        if ( (device.isMobile() || device.isTablet()) && mobileVersion.equals( "basic" ) )
         {
             url = getRootPath( request ) + "/light/index.action";
         }
-        else if ( mobileVersion.equals( "smartphone" ) )
+        else if ( (device.isMobile() || device.isTablet()) && mobileVersion.equals( "smartphone" ) )
         {
             url = getRootPath( request ) + "/mobile";
         }
-        else if ( mobileVersion.equals( "desktop" ) )
+        else if ( (device.isMobile() || device.isTablet()) && mobileVersion.equals( "desktop" ) )
         {
             url = getRootPath( request ) + "/";
         }