Skip to content

Commit

Permalink
Fixed a properties error I caused eariler
Browse files Browse the repository at this point in the history
  • Loading branch information
arc12012 committed Apr 19, 2017
1 parent a043509 commit 791e43d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/database/TicketQueries.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ public static void acceptTicket(int ticketid, int deviceid, int locationid, int
Statement stmt = connect.createStatement();
long milliseconds = new java.util.Date().getTime();
stmt.executeUpdate("UPDATE ticket, devices SET ticket.Status = \"Approved\", devices.Ticket_ID = " + ticketid + ", devices.Status = \"Shipped\", devices.Renter = " + sso + ", devices.Location = " + locationid + " WHERE ticket.Ticket_ID = " + ticketid + " AND devices.Device_ID = " + deviceid);

// We also need to update ticket's STD field (the one with the date of its last modification)
+ String query = "UPDATE ticket SET Status_Date_Fields = "+milliseconds+" WHERE Ticket_ID = "+ticketid+";";
+ stmt.executeQuery(query);
stmt.close();
connect.close();
}
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/Mail.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void sendTicketConfirmation(int[] ticketIDs) throws IOException, Interrup
}
msg=msg.replace("{TICKETS GO HERE}",tickethtml);
Properties properties = System.getProperties();
// properties = setProp(sender, client.getEmail());
properties = setProp(sender, client.getEmail());
Session session = Session.getInstance(properties, new Authenticator() {
protected PasswordAuthentication getPasswordAuthentication(){
return new PasswordAuthentication(sender, password);
Expand Down
1 change: 1 addition & 0 deletions src/utilities/NotificationQueue.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public void run(){
if(threadArray[i].getName().equals(threadName)) match=true;
}
if(match){
System.out.println("Redundant notification queue thread will terminat"e);
return; //should kill thread
}
else{
Expand Down

0 comments on commit 791e43d

Please sign in to comment.