Changeset 8421


Ignore:
Timestamp:
2004-10-29T12:58:36+13:00 (19 years ago)
Author:
schweer
Message:

bugfix about updating the ModifiedTime field

Location:
trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/doctypes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/doctypes/DocumentList.java

    r8408 r8421  
    401401    System.out.println("Updating timestamps " + thisTimeStamp + " " + lastTimeStamp);
    402402
    403     DocumentSQLWriter.touchDocument(document.getID(), this.connection, time.getTime());
     403    DocumentSQLWriter.touchDocument(document.getID(), this.connection, time.getTime(), thisTimeStamp);
    404404      }
    405405    }
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/doctypes/DocumentSQLWriter.java

    r8408 r8421  
    1515  }
    1616
    17   public static boolean touchDocument(DocumentID docID, GS3SQLConnection connection, long touchTime)
     17  public static boolean touchDocument(DocumentID docID, GS3SQLConnection connection, long touchTime, long modTime)
    1818  { GS3SQLUpdate update = new GS3SQLUpdate("document");
    1919    update.setWhere(new GS3SQLWhere(new GS3SQLWhereItem("DocID", "=", docID.toString())));
    2020    update.addDate("IndexedDate", new java.sql.Timestamp(touchTime));
     21    update.addDate("ModifiedDate", new java.sql.Timestamp(modTime));
    2122    connection.execute(update.toString());
    2223    System.out.println(update.toString());
     
    5758    else {
    5859      /* redundant code - not used... */
    59       GS3SQLUpdate update = new GS3SQLUpdate("document");
    60       update.setWhere(new GS3SQLWhere(new GS3SQLWhereItem("DocID", "=", document.getID().toString())));
    61       connection.execute(update.toString());
     60      //      GS3SQLUpdate update = new GS3SQLUpdate("document");
     61      //      update.setWhere(new GS3SQLWhere(new GS3SQLWhereItem("DocID", "=", document.getID().toString())));
     62      //      connection.execute(update.toString());
    6263    }
    6364      }
Note: See TracChangeset for help on using the changeset viewer.