projects
/
Plinn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Édition des propriétés des membres, à partir de l'annuaire, à nouveau possible.
[Plinn.git]
/
utils.py
diff --git
a/utils.py
b/utils.py
index
e867b0d
..
863b94e
100755
(executable)
--- a/
utils.py
+++ b/
utils.py
@@
-87,15
+87,17
@@
def capitalizeCompoundGivenName(givenName) :
def formatFullName(memberName, memberGivenName, memberId, nameBefore=1) :
def formatFullName(memberName, memberGivenName, memberId, nameBefore=1) :
- memberFullName = ''
+ memberName = memberName.decode('utf-8')
+ memberGivenName = memberGivenName.decode('utf-8')
+ memberFullName = u''
if memberName and memberGivenName :
if nameBefore :
if memberName and memberGivenName :
if nameBefore :
- memberFullName = memberName.
capitalize
() + ' ' + capitalizeCompoundGivenName(memberGivenName)
+ memberFullName = memberName.
upper
() + ' ' + capitalizeCompoundGivenName(memberGivenName)
else :
else :
- memberFullName = capitalizeCompoundGivenName(memberGivenName) + ' ' + memberName.
capitalize
()
+ memberFullName = capitalizeCompoundGivenName(memberGivenName) + ' ' + memberName.
upper
()
elif memberName and not memberGivenName :
elif memberName and not memberGivenName :
- memberFullName = memberName.
capitalize
()
+ memberFullName = memberName.
upper
()
elif not memberName and memberGivenName :
memberFullName = capitalizeCompoundGivenName(memberGivenName)
elif not memberName and memberGivenName :
memberFullName = capitalizeCompoundGivenName(memberGivenName)
@@
-103,7
+105,7
@@
def formatFullName(memberName, memberGivenName, memberId, nameBefore=1) :
else :
memberFullName = memberId
else :
memberFullName = memberId
- return memberFullName
+ return memberFullName
.encode('utf-8')
# from OFS.ObjectManager #63
bad_url_chars = re.compile(r'[^a-zA-Z0-9-_~,.$\(\)@]')
# from OFS.ObjectManager #63
bad_url_chars = re.compile(r'[^a-zA-Z0-9-_~,.$\(\)@]')