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
commit fca379e0a075db5f68b18410be26d9c0f1a74dad Author: Sebb <[email protected]> AuthorDate: Fri Jun 18 14:31:16 2021 +0100 Sort output; cache locally --- www/secretary/public-names.cgi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/www/secretary/public-names.cgi b/www/secretary/public-names.cgi index 6515c24..38209b3 100755 --- a/www/secretary/public-names.cgi +++ b/www/secretary/public-names.cgi @@ -38,8 +38,9 @@ _html do _h1 "public names: LDAP vs iclas.txt" - # prefetch LDAP data - ASF::Person.preload(%w(cn dn)) + # prefetch LDAP data + # Seems it needs to be saved in a variable to ensure it is cached + _cache = ASF::Person.preload(%w(cn dn)) if @updates @@ -155,7 +156,7 @@ _html do _th "LDAP cn" end - ASF::ICLA.each do |icla| + ASF::ICLA.each.sort_by{|icla| icla.id}.each do |icla| next if icla.noId? person = ASF::Person.find(icla.id) next unless person.dn and person.attrs['cn']
