projects
/
Plinn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Localisation des messages relatifs à la réinitialisation de son mot de passe.
[Plinn.git]
/
utils.py
diff --git
a/utils.py
b/utils.py
index
470b49a
..
252af4e
100755
(executable)
--- a/
utils.py
+++ b/
utils.py
@@
-27,6
+27,7
@@
import re
from types import StringType
from random import randrange
from Acquisition import aq_base
from types import StringType
from random import randrange
from Acquisition import aq_base
+from quopri import encodestring
from AccessControl.PermissionRole import rolesForPermissionOn
from AccessControl import ModuleSecurityInfo
from AccessControl import getSecurityManager
from AccessControl.PermissionRole import rolesForPermissionOn
from AccessControl import ModuleSecurityInfo
from AccessControl import getSecurityManager
@@
-251,6
+252,11
@@
def getAdapterByInterface(ob, dotted_name, default=_marker) :
else :
return default
else :
return default
+def encodeQuopriEmail(name, email) :
+ qpName = encodestring(name).replace('=\n', '')
+ return '''"=?utf-8?q?%s?=" <%s>''' % (qpName, email)
+
+
def _sudo(func, userid=None) :
"""
execute func or any callable object
def _sudo(func, userid=None) :
"""
execute func or any callable object