community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1760156 - in /comdev/reporter.apache.org/trunk/site: addrelease.html render.js
Date Sat, 10 Sep 2016 12:46:40 GMT
Author: sebb
Date: Sat Sep 10 12:46:40 2016
New Revision: 1760156

URL: http://svn.apache.org/viewvc?rev=1760156&view=rev
Log:
Prevent future-dated entries

Modified:
    comdev/reporter.apache.org/trunk/site/addrelease.html
    comdev/reporter.apache.org/trunk/site/render.js

Modified: comdev/reporter.apache.org/trunk/site/addrelease.html
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/addrelease.html?rev=1760156&r1=1760155&r2=1760156&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/addrelease.html (original)
+++ comdev/reporter.apache.org/trunk/site/addrelease.html Sat Sep 10 12:46:40 2016
@@ -66,6 +66,11 @@
         alert("Please fill out the release date using YYYY-MMM-DD!")
         return false
       }
+      var now = (new Date().getTime())/1000
+      if (nn >= now) {
+        alert("The date is in the future!")
+        return false
+      }
       return true
      }
      

Modified: comdev/reporter.apache.org/trunk/site/render.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/render.js?rev=1760156&r1=1760155&r2=1760156&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/render.js (original)
+++ comdev/reporter.apache.org/trunk/site/render.js Sat Sep 10 12:46:40 2016
@@ -1022,6 +1022,11 @@ function addRelease(pmc, version, date)
 		var x = date.split("-");
 		var y = new Date(x[0], parseInt(x[1]) - 1, parseInt(x[2]));
 		var nn = parseInt(y.getTime() / 1000);
+		var now = (new Date().getTime()) / 1000;
+		if (nn >= now) {
+		    alert("Date is in the future!")
+		    return
+		}
 		GetAsyncJSON("addrelease.py?json=true&committee=" + pmc + "&version=" + escape(version)
+ "&date=" + nn, null, function(json) {
 			if (json && json.versions) {
 				var n = 0;



Mime
View raw message