X-Git-Url: https://scm.cri.ensmp.fr/git/Plinn.git/blobdiff_plain/4f6cc7ed9e24196383be02e8bbc38e02795b08ab..3a90429ca4498086cc762cad292071a1c4cb44d9:/utils.py?ds=inline diff --git a/utils.py b/utils.py index 8f6bd3d..6261982 100755 --- a/utils.py +++ b/utils.py @@ -94,12 +94,12 @@ def formatFullName(memberName, memberGivenName, memberId, nameBefore=1) : memberFullName = u'' if memberName and memberGivenName : if nameBefore : - memberFullName = memberName.upper() + ' ' + capitalizeCompoundGivenName(memberGivenName) + memberFullName = memberName.capitalize() + ' ' + capitalizeCompoundGivenName(memberGivenName) else : - memberFullName = capitalizeCompoundGivenName(memberGivenName) + ' ' + memberName.upper() + memberFullName = capitalizeCompoundGivenName(memberGivenName) + ' ' + memberName.capitalize() elif memberName and not memberGivenName : - memberFullName = memberName.upper() + memberFullName = memberName.capitalize() elif not memberName and memberGivenName : memberFullName = capitalizeCompoundGivenName(memberGivenName) @@ -165,7 +165,11 @@ def _checkMemberPermission(userid, permission, obj, StringType = type('')): return 0 def getCPInfo(self) : - try: cp = _cb_decode(self.REQUEST['__cp']) + if self.REQUEST.RESPONSE.cookies.has_key('__cp') : + cp = self.REQUEST.RESPONSE.cookies['__cp']['value'] + else : + cp = self.REQUEST.get('__cp') + try: cp = _cb_decode(cp) except: return None return cp