Start using the new MailingList class.
[platal.git] / include / validations / listes.inc.php
index ef19a21..f4caad9 100644 (file)
@@ -138,15 +138,16 @@ class ListeReq extends Validate
                                                   array('ListsModule', 'no_login_callback'));
             $owners = User::getBulkForlifeEmails($this->owners, true,
                                                  array('ListsModule', 'no_login_callback'));
-            $list = new MMList(S::user(), $this->domain);
 
             // Make sure we send a list (array_values) of unique (array_unique)
             // emails.
             $owners = array_values(array_unique($owners));
             $members = array_values(array_unique($members));
-            $success = $list->create_list($this->liste, utf8_decode($this->desc), $this->advertise,
-                                          $this->modlevel, $this->inslevel,
-                                          $owners, $members);
+
+            $list = new MailingList($this->liste, $this->domain, S::user());
+            $success = $list->create($this->desc, $this->advertise,
+                                     $this->modlevel, $this->inslevel,
+                                     $owners, $members);
             if ($success) {
                 create_list($this->liste, $this->domain);
             }