------------------------------------------------------------
revno: 4930
committer: Morten Olav Hansen <[email protected]>
branch nick: dhis2
timestamp: Thu 2011-10-13 14:52:53 +0200
message:
  (mobile) re-enabled proper mobile-redirect after login
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	2011-10-13 12:23:49 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/MappedRedirectStrategy.java	2011-10-13 12:52:53 +0000
@@ -84,12 +84,12 @@
                 url = url.replaceFirst( key, redirectMap.get( key ) );
             }
         }
-        
-        // TODO fix this
-//        if ( device.isMobile() )
-//        {
-//            url = "mobile/index.action";
-//        }
+
+        if ( device.isMobile() )
+        {
+            url = request.getHeader( "referer" ).replaceFirst( "/dhis-web-commons/security/login.action",
+                "/mobile/index.action" );
+        }
 
         super.sendRedirect( request, response, url );
     }

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

Reply via email to