]> WPIA git - gigi.git/commitdiff
fix: sorts verification entry output by date entered
authorINOPIAE <m.maengel@inopiae.de>
Tue, 26 Jul 2016 05:54:28 +0000 (07:54 +0200)
committerFelix Dörre <felix@dogcraft.de>
Tue, 26 Jul 2016 19:41:17 +0000 (21:41 +0200)
fixes issue #85

Change-Id: Ie7e6bb39e8ae51bfdc1b91bc3304dab30a2b17f1

src/org/cacert/gigi/dbObjects/User.java

index 18b50f5df5245bc4ec142d8cd16e0f0bfef328fe..e5175694ed1b8ac1083ad728de76740a283d4cc9 100644 (file)
@@ -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()) {