dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19785
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8772: Impl getContextPath method in ContextUtils
------------------------------------------------------------
revno: 8772
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-10-30 17:13:06 +0300
message:
Impl getContextPath method in ContextUtils
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AccountController.java
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/ContextUtils.java
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/recovery.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/restore.vm
--
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-api/src/main/java/org/hisp/dhis/api/controller/AccountController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AccountController.java 2012-10-30 06:50:49 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AccountController.java 2012-10-30 14:13:06 +0000
@@ -102,7 +102,7 @@
HttpServletRequest request,
HttpServletResponse response )
{
- String rootPath = ContextUtils.getRootPath( request );
+ String rootPath = ContextUtils.getContextPath( request );
boolean recover = securityService.sendRestoreMessage( username, rootPath );
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/ContextUtils.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/ContextUtils.java 2012-10-24 08:31:40 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/ContextUtils.java 2012-10-30 14:13:06 +0000
@@ -213,7 +213,7 @@
return getRootPath( getRequest() ) + "/" + resourcePath;
}
- public static String getRootPath( HttpServletRequest request )
+ public static String getContextPath( HttpServletRequest request )
{
StringBuilder builder = new StringBuilder();
String xForwardedProto = request.getHeader( "X-Forwarded-Proto" );
@@ -247,8 +247,14 @@
}
builder.append( request.getContextPath() );
+
+ return builder.toString();
+ }
+
+ public static String getRootPath( HttpServletRequest request )
+ {
+ StringBuilder builder = new StringBuilder( getContextPath( request ) );
builder.append( request.getServletPath() );
-
return builder.toString();
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/recovery.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/recovery.vm 2012-10-30 07:18:35 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/recovery.vm 2012-10-30 14:13:06 +0000
@@ -34,8 +34,8 @@
</form>
<div id="recoverySuccessMessage" style="display:none">
-Please check your email inbox for this user account. We have sent you instructions
-on how to restore your password.
+Please check the email account which you registered for this username. We have
+sent you instructions on how to restore your password.
</div>
<div id="recoveryErrorMessage" style="display:none">
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/restore.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/restore.vm 2012-10-30 07:18:35 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/restore.vm 2012-10-30 14:13:06 +0000
@@ -48,8 +48,8 @@
</form>
<div id="restoreSuccessMessage" style="display:none">
-You account was successfully restored. Go to the <a href="login.action">login page and log in</a>
-with your new password.
+You account was successfully restored. Use your new password to
+<a href="login.action">log in at the login page</a>.
</div>
<div id="restoreErrorMessage" style="display:none">