dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33299
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16987: Fixed bug with Cal add/subtract.
------------------------------------------------------------
revno: 16987
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-10-07 22:19:04 +0200
message:
Fixed bug with Cal add/subtract.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/Cal.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/RestoreType.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-api/src/main/java/org/hisp/dhis/period/Cal.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/Cal.java 2014-08-29 10:02:21 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/Cal.java 2014-10-07 20:19:04 +0000
@@ -117,11 +117,11 @@
switch ( field )
{
case Calendar.YEAR:
- getCalendar().plusYears( dateTimeUnit, amount );
+ dateTimeUnit = getCalendar().plusYears( dateTimeUnit, amount );
case Calendar.MONTH:
- getCalendar().plusMonths( dateTimeUnit, amount );
+ dateTimeUnit = getCalendar().plusMonths( dateTimeUnit, amount );
case Calendar.DAY_OF_MONTH:
- getCalendar().plusDays( dateTimeUnit, amount );
+ dateTimeUnit = getCalendar().plusDays( dateTimeUnit, amount );
}
return this;
@@ -138,11 +138,11 @@
switch ( field )
{
case Calendar.YEAR:
- getCalendar().minusYears( dateTimeUnit, amount );
+ dateTimeUnit = getCalendar().minusYears( dateTimeUnit, amount );
case Calendar.MONTH:
- getCalendar().minusMonths( dateTimeUnit, amount );
+ dateTimeUnit = getCalendar().minusMonths( dateTimeUnit, amount );
case Calendar.DAY_OF_MONTH:
- getCalendar().minusDays( dateTimeUnit, amount );
+ dateTimeUnit = getCalendar().minusDays( dateTimeUnit, amount );
}
return this;
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/RestoreType.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/RestoreType.java 2014-07-24 16:38:14 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/RestoreType.java 2014-10-07 20:19:04 +0000
@@ -37,7 +37,7 @@
public enum RestoreType
{
- RECOVER_PASSWORD( Calendar.HOUR_OF_DAY, 1, "restore_message", "email_restore_subject", "restore.action" ),
+ RECOVER_PASSWORD( Calendar.DAY_OF_MONTH, 2, "restore_message", "email_restore_subject", "restore.action" ),
INVITE( Calendar.MONTH, 3, "invite_message", "email_invite_subject", "invite.action" );
/**