You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2018/07/30 22:38:21 UTC
[whimsy] branch master updated: Del and III
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 14f4a52 Del and III
14f4a52 is described below
commit 14f4a5272814a0355d32659f1324379a620c08a1
Author: Sebb <se...@apache.org>
AuthorDate: Mon Jul 30 23:38:19 2018 +0100
Del and III
---
www/secretary/ldap-names.cgi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/www/secretary/ldap-names.cgi b/www/secretary/ldap-names.cgi
index fa09fa2..891cd65 100755
--- a/www/secretary/ldap-names.cgi
+++ b/www/secretary/ldap-names.cgi
@@ -131,6 +131,7 @@ _html do
new_given = '???'
new_sn = '???'
names = p.cn.split(' ')
+ names.pop if %w(II III IV).include? names[-1] # drop numbers
if names.size == 2
new_given = names[0]
new_sn = names[1]
@@ -140,7 +141,7 @@ _html do
new_sn = names.join(' ')
end
elsif names.size == 3
- if names[1] == 'van' or names[1] == 'de' or names[1] == 'le'
+ if names[1] == 'van' or names[1] == 'de' or names[1] == 'le' or names[1] =~ /^[Dd]el$/
new_given = names.shift
new_sn = names.join(' ')
elsif names[1] =~ /^[A-Z]\.$/ or names[1] =~ /^[A-NP-Z]$/ # James A. Taylor or Jon B Goode (not Jack O Connor)