Commit 6d03ac60 authored by Gary Wong's avatar Gary Wong

Convert "approved" to timestamp when looking up existing reservations.

This was preventing edits to previously approved reservations.
parent 84e4285e
......@@ -156,7 +156,8 @@ sub Lookup($$;$$$$)
$query_result = DBQueryWarn( "SELECT *, UNIX_TIMESTAMP(start) AS s, " .
"UNIX_TIMESTAMP(end) AS e, " .
"UNIX_TIMESTAMP(created) AS c " .
"UNIX_TIMESTAMP(created) AS c, " .
"UNIX_TIMESTAMP(approved) AS a " .
"FROM future_reservations " .
"WHERE pid_idx='$pid_idx' AND " .
"nodes='$nodes' AND " .
......@@ -172,7 +173,8 @@ sub Lookup($$;$$$$)
$query_result = DBQueryWarn( "SELECT *, UNIX_TIMESTAMP(start) AS s, " .
"UNIX_TIMESTAMP(end) AS e, " .
"UNIX_TIMESTAMP(created) AS c " .
"UNIX_TIMESTAMP(created) AS c, " .
"UNIX_TIMESTAMP(approved) AS a " .
"FROM future_reservations " .
"WHERE idx='$idx'" );
......@@ -196,7 +198,7 @@ sub Lookup($$;$$$$)
$self->{'UID_IDX'} = $record->{'uid_idx'};
$self->{'NOTES'} = $record->{'notes'};
$self->{'ADMIN_NOTES'} = $record->{'admin_notes'};
$self->{'APPROVED'} = $record->{'approved'};
$self->{'APPROVED'} = $record->{'a'};
$self->{'APPROVER'} = $record->{'approver'};
bless($self, $class);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment