Remove rewrite rules when deleting an alias
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 21 Aug 2006 19:42:01 +0000 (19:42 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 21 Aug 2006 19:42:01 +0000 (19:42 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@827 839d8a87-29fc-0310-9880-83ba4fa771e5

ChangeLog
modules/admin.php

index e303b8c..1c08b0f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,7 @@ New:
 
     * Emails:
         - Switch to the new URI scheme.                                     -MC
+        - Work around broken emails (detection, marketing...)              -FRU
 
     * Events:
         - Switch to the new URI scheme.                                 -MC/FRU
index 6a3990f..8d59296 100644 (file)
@@ -403,6 +403,10 @@ class AdminModule extends PLModule
                         if (!empty($val)) {
                             XDB::execute("DELETE FROM aliases WHERE id={?} AND alias={?}
                                     AND type!='a_vie' AND type!='homonyme'", $mr['user_id'], $val);
+                            XDB::execute("UPDATE emails
+                                             SET rewrite = ''
+                                           WHERE uid = {?} AND rewrite LIKE CONCAT({?}, '@%')",
+                                         $mr['user_id'], $val);               
                             fix_bestalias($mr['user_id']);
                             $page->trig($val." a été supprimé");
                         }