petite icone pour specifier le tri dans le table-editor
[platal.git] / bin / lists.rpc.py
index 5003ad3..6a855fa 100755 (executable)
@@ -52,6 +52,7 @@ class AuthFailed(Exception): pass
 #------------------------------------------------
 
 config = ConfigParser.ConfigParser()
+config.read(os.path.dirname(__file__)+'/../configs/platal.ini')
 config.read(os.path.dirname(__file__)+'/../configs/platal.conf')
 
 def get_config(sec, val, default=None):
@@ -170,7 +171,7 @@ def quote(s, is_header=False):
         h = Utils.oneline(s, 'iso-8859-1')
     else:
         h = s
-    h = str('').join(re.split('[\x00-\x09\x0B\x1f]+', s))
+    h = str('').join(re.split('[\x00-\x09\x0B-\x1f]+', h))
     return Utils.uquote(h.replace('&', '&amp;').replace('>', '&gt;').replace('<', '&lt;')) 
 
 def to_forlife(email):
@@ -817,6 +818,10 @@ def create_list(userdesc, perms, vhost, listname, desc, advertise, modlevel, ins
 
         mlist.Unlock()
 
+        if ON_CREATE_CMD != '':
+            try:    os.system(ON_CREATE_CMD + ' ' + name)
+            except: pass
+
         check_options(userdesc, perms, vhost, listname.lower(), True)
         mass_subscribe(userdesc, perms, vhost, listname.lower(), members)
 
@@ -825,9 +830,6 @@ def create_list(userdesc, perms, vhost, listname, desc, advertise, modlevel, ins
         mlist._UpdateRecords()
         mlist.Save()
         mlist.Unlock()
-        if ON_CREATE_CMD != '':
-            try:    os.system(ON_CREATE_CMD + ' ' + name)
-            except: pass
     except:
         try:
             mlist.Unlock()