← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7720: clean code

 

------------------------------------------------------------
revno: 7720
committer: Lai <lai.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-07-26 16:56:22 +0700
message:
  clean code
modified:
  dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/MobileOrgUnitLinks.java
  dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/action/UpdateClientAction.java
  dhis-2/dhis-web/dhis-web-api-mobile/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/action/LoginAction.java
  dhis-2/dhis-web/dhis-web-portal/pom.xml


--
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-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/MobileOrgUnitLinks.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/MobileOrgUnitLinks.java	2012-07-20 08:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/MobileOrgUnitLinks.java	2012-07-26 09:56:22 +0000
@@ -58,7 +58,7 @@
 
     private String searchUrl;
 
-    public static double currentVersion = 2.9;
+    public static double currentVersion = 3.0;
 
     private String updateNewVersionUrl;
 

=== modified file 'dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/action/UpdateClientAction.java'
--- dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/action/UpdateClientAction.java	2012-07-10 09:24:04 +0000
+++ dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/action/UpdateClientAction.java	2012-07-26 09:56:22 +0000
@@ -49,7 +49,6 @@
     // -------------------------------------------------------------------------
 
     private String fileName = "DHISMobile-Aggregate.jar";
-    //private String fileName = "../webapps/dhis/dhis-web-commons/DHISMobile-Aggregate.jar";
     private InputStream inputStream;
     public String getFileName()
     {
@@ -75,15 +74,11 @@
     public String execute()
         throws Exception
     {
-//        File fileToDownload = new File( System.getenv("dhis2_home"), fileName );
-        File dir1 = new File(".");
-        System.out.println("Current dir: " + dir1.getCanonicalPath());
         File fileToDownload = new File( fileName );
+        
         if ( fileToDownload != null )
-
+            
             inputStream = new BufferedInputStream( new FileInputStream( fileToDownload ) );
-         
-         
         
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-api-mobile/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-api-mobile/src/main/resources/struts.xml	2012-07-02 06:43:56 +0000
+++ dhis-2/dhis-web/dhis-web-api-mobile/src/main/resources/struts.xml	2012-07-26 09:56:22 +0000
@@ -7,7 +7,8 @@
 
 	<package name="dhis-web-api-mobile" extends="dhis-web-commons"
 		namespace="/dhis-web-api-mobile">
-		<action name="updateClient" class="org.hisp.dhis.api.mobile.action.UpdateClientAction">
+		<action name="updateClient"
+			class="org.hisp.dhis.api.mobile.action.UpdateClientAction">
 			<result name="success" type="stream">
 				<param name="contentType">application/.jar</param>
 				<param name="inputName">inputStream</param>

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/action/LoginAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/action/LoginAction.java	2012-01-20 10:38:11 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/action/LoginAction.java	2012-07-26 09:56:22 +0000
@@ -74,12 +74,18 @@
     public String execute()
     {
         Device device = deviceResolver.resolveDevice( ServletActionContext.getRequest() );
-
+        
+        System.out.println(ServletActionContext.getRequest().getHeader( "User-Agent" ));
+        System.out.println(ServletActionContext.getRequest().getHeader("x-wap-profile"));
+        System.out.println(ServletActionContext.getRequest().getHeader("Profile"));
+        System.out.println(ServletActionContext.getRequest().getHeader("Accept"));
+        
         if ( device.isMobile() )
         {
+            System.out.println("mobile");
             return "mobile";
         }
-
+            System.out.println("PC");
         return "standard";
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-portal/pom.xml'
--- dhis-2/dhis-web/dhis-web-portal/pom.xml	2012-05-29 11:52:52 +0000
+++ dhis-2/dhis-web/dhis-web-portal/pom.xml	2012-07-26 09:56:22 +0000
@@ -151,7 +151,6 @@
       <version>${project.version}</version>
       <type>war</type>
     </dependency>
-    
   </dependencies>
   <properties>
     <rootDir>../../</rootDir>