public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pmg-devel] [PATCH pmg-api] quarantine: userlists: sort result
@ 2024-02-22 21:07 Stoiko Ivanov
  2024-02-23 16:50 ` [pmg-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Stoiko Ivanov @ 2024-02-22 21:07 UTC (permalink / raw)
  To: pmg-devel

probably just cosmetic - but I noticed it while testing the patch that
fixes the sync of an empty userlist.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 src/PMG/Quarantine.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/PMG/Quarantine.pm b/src/PMG/Quarantine.pm
index e19e96f..d06a88d 100644
--- a/src/PMG/Quarantine.pm
+++ b/src/PMG/Quarantine.pm
@@ -59,8 +59,8 @@ sub add_to_blackwhite {
 	    }
 	}
 
-	my $wlist = $dbh->quote(encode('UTF-8', join (',', keys %{$list->{WL}})) || '');
-	my $blist = $dbh->quote(encode('UTF-8', join (',', keys %{$list->{BL}})) || '');
+	my $wlist = $dbh->quote(encode('UTF-8', join (',', sort keys %{$list->{WL}})) || '');
+	my $blist = $dbh->quote(encode('UTF-8', join (',', sort keys %{$list->{BL}})) || '');
 
 	if (!$delete) {
 	    my $maxlen = 200000;
@@ -81,7 +81,7 @@ sub add_to_blackwhite {
 	$dbh->do($queries);
     }
 
-    my $values =  [ keys %{$list->{$name}} ];
+    my $values =  [ sort keys %{$list->{$name}} ];
 
     return $values;
 }
-- 
2.39.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-23 16:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-22 21:07 [pmg-devel] [PATCH pmg-api] quarantine: userlists: sort result Stoiko Ivanov
2024-02-23 16:50 ` [pmg-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal