Merge remote branch 'origin/xorg/1.0.2/master' into xorg/master
[platal.git] / include / marketing.inc.php
index 18a3fe9..9943499 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2010 Polytechnique.org                              *
+ *  Copyright (C) 2003-2011 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -329,9 +329,9 @@ class ListMarketing extends AnnuaireMarketing
 
     public function process(array $user)
     {
-        return XDB::execute("REPLACE INTO  register_subs (uid, type, sub, domain)
-            VALUES  ({?}, 'list', {?}, {?})",
-                $user['id'], $this->name, $this->domain);
+        return XDB::execute("INSERT IGNORE INTO  register_subs (uid, type, sub, domain)
+                                         VALUES  ({?}, 'list', {?}, {?})",
+                            $user['id'], $this->name, $this->domain);
     }
 }
 
@@ -359,9 +359,9 @@ class GroupMarketing extends AnnuaireMarketing
 
     public function process(array $user)
     {
-        return XDB::execute("REPLACE INTO  register_subs (uid, type, sub, domain)
-            VALUES  ({?}, 'group', {?}, '')",
-                $user['id'], $this->group);
+        return XDB::execute("INSERT IGNORE INTO  register_subs (uid, type, sub, domain)
+                                         VALUES  ({?}, 'group', {?}, '')",
+                            $user['id'], $this->group);
     }
 }