This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new b1c56fc  Do sort closer to where it is needed
b1c56fc is described below

commit b1c56fcc9438e9a75e898e2a309c6b6cd5eb7ffd
Author: Sebb <[email protected]>
AuthorDate: Mon Aug 16 12:04:08 2021 +0100

    Do sort closer to where it is needed
---
 www/members/security-subs.cgi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/www/members/security-subs.cgi b/www/members/security-subs.cgi
index 400786f..8a0d8f9 100755
--- a/www/members/security-subs.cgi
+++ b/www/members/security-subs.cgi
@@ -91,7 +91,6 @@ _html do
       committee = ASF::Committee.find(path)
       project = ASF::Project.find(path)
       colors=Hash.new{|h,k| h[k]=Array.new} # ids for each color
-      order=['bg-danger', 'bg-warning', 'bg-info', 'bg-success', ''] # sort 
order
       subh = Hash[
         lists[path][:subscribers].map do |email, person|
           name = '*UNKNOWN*'
@@ -116,7 +115,7 @@ _html do
           colors[color] << person&.name || ''
           [email, {person: person , color: color, name: name}]
         end
-      ].sort_by {|k,v| [order.index(v[:color]),v[:name]]}
+      ]
 
       _table do
         _tr do
@@ -176,7 +175,8 @@ _html do
         end
 
         _tbody do
-          subh.each do |email, hash|
+          order=['bg-danger', 'bg-warning', 'bg-info', 'bg-success', ''] # 
sort order
+          subh.sort_by {|k,v| [order.index(v[:color]),v[:name]]}.each do 
|email, hash|
             color = hash[:color]
             person = hash[:person]
             name = hash[:name]

Reply via email to