[HepData-svn] r1886 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Mon Jul 27 14:52:42 BST 2015


Author: watt
Date: Mon Jul 27 14:52:42 2015
New Revision: 1886

Log:
Modify AllIds to write IDs when DateUpdated is NULL

Modified:
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/AllIds.java

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/AllIds.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/AllIds.java	Thu Jul 23 18:07:40 2015	(r1885)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/AllIds.java	Mon Jul 27 14:52:42 2015	(r1886)
@@ -36,8 +36,13 @@
     public void setPaper(Paper p) { _paper = p; }
 
     public List <Paper> getPapers(){
-       Query q = _session.createQuery("from Paper p where p._dateupdated > '"+fromdate+"'");
-        return q.list();
+	if (fromdate.equals("0")) {
+	    Query q = _session.createQuery("from Paper p");
+	    return q.list();
+	} else {
+	    Query q = _session.createQuery("from Paper p where p._dateupdated > '"+fromdate+"'");
+	    return q.list();
+	}
     }
     public Long getInspireId(){
         Long zero= new Long("0");


More information about the HepData-svn mailing list