From: INOPIAE Date: Tue, 26 Jul 2016 05:54:28 +0000 (+0200) Subject: fix: sorts verification entry output by date entered X-Git-Url: https://code.wpia.club/?p=gigi.git;a=commitdiff_plain;h=b362e38bfcbaa708a0b5a461569e2664712628da fix: sorts verification entry output by date entered fixes issue #85 Change-Id: Ie7e6bb39e8ae51bfdc1b91bc3304dab30a2b17f1 --- diff --git a/src/org/cacert/gigi/dbObjects/User.java b/src/org/cacert/gigi/dbObjects/User.java index 18b50f5d..e5175694 100644 --- a/src/org/cacert/gigi/dbObjects/User.java +++ b/src/org/cacert/gigi/dbObjects/User.java @@ -323,7 +323,7 @@ public class User extends CertificateOwner { public synchronized Assurance[] getReceivedAssurances() { if (receivedAssurances == null) { - try (GigiPreparedStatement query = new GigiPreparedStatement("SELECT * FROM `notary` INNER JOIN `names` ON `names`.`id` = `notary`.`to` WHERE `names`.`uid`=? AND `notary`.`deleted` IS NULL")) { + try (GigiPreparedStatement query = new GigiPreparedStatement("SELECT * FROM `notary` INNER JOIN `names` ON `names`.`id` = `notary`.`to` WHERE `names`.`uid`=? AND `notary`.`deleted` IS NULL ORDER BY `when` DESC")) { query.setInt(1, getId()); GigiResultSet res = query.executeQuery(); @@ -342,7 +342,7 @@ public class User extends CertificateOwner { public synchronized Assurance[] getMadeAssurances() { if (madeAssurances == null) { - try (GigiPreparedStatement query = new GigiPreparedStatement("SELECT * FROM notary WHERE `from`=? AND deleted is NULL")) { + try (GigiPreparedStatement query = new GigiPreparedStatement("SELECT * FROM notary WHERE `from`=? AND deleted is NULL ORDER BY `when` DESC")) { query.setInt(1, getId()); try (GigiResultSet res = query.executeQuery()) {