[Ils-source] r1483 - in trunk/webapp: WEB-INF/lib api/user/put

scribe at crosswire.org scribe at crosswire.org
Wed Jul 13 03:45:45 MST 2016


Author: scribe
Date: 2016-07-13 03:45:45 -0700 (Wed, 13 Jul 2016)
New Revision: 1483

Modified:
   trunk/webapp/WEB-INF/lib/crosswire.jar
   trunk/webapp/api/user/put/index.jsp
Log:
user/put, allow 0/0/0000 to null out date value for hire and term date


Modified: trunk/webapp/WEB-INF/lib/crosswire.jar
===================================================================
(Binary files differ)

Modified: trunk/webapp/api/user/put/index.jsp
===================================================================
--- trunk/webapp/api/user/put/index.jsp	2016-07-13 09:59:52 UTC (rev 1482)
+++ trunk/webapp/api/user/put/index.jsp	2016-07-13 10:45:45 UTC (rev 1483)
@@ -233,9 +233,9 @@
 	val = request.getParameter("hireDate");
 	++errCode;
 	if ((val != null) && (!val.startsWith("m"))) {
-		Date v = Utils.parseDate(val, 150 * 365, 10 * 365);
+		Date v = Utils.parseDate(val, -1, -1);
 		if (v != null) {
-			current.setUserProfileHireDate(v);
+			current.setUserProfileHireDate(v.getTime() > 0 ? v : null);
 		}
 		else {
 			errMsg = "Invalid Hire Date, please enter a reasonable date using the format MM/DD/YYYY";
@@ -247,9 +247,9 @@
 	++errCode;
 	val = request.getParameter("termDate");
 	if ((val != null) && (!val.startsWith("m"))) {
-		Date v = Utils.parseDate(val, 150 * 365, 10 * 365);
+		Date v = Utils.parseDate(val, -1, -1);
 		if (v != null) {
-			current.setUserProfileTermDate(v);
+			current.setUserProfileTermDate(v.getTime() > 0 ? v : null);
 		}
 		else {
 			errMsg = "Invalid Termination Date, please enter a reasonable date using the format MM/DD/YYYY";




More information about the Ils-source mailing list