Update notification count when adding/removing a contact.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sat, 5 Jun 2010 12:26:50 +0000 (14:26 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sat, 5 Jun 2010 12:27:16 +0000 (14:27 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
modules/carnet.php

index d71aec1..054d07a 100644 (file)
@@ -270,6 +270,7 @@ class CarnetModule extends PLModule
                     if (XDB::execute("DELETE FROM  contacts
                                             WHERE  uid = {?} AND contact = {?}",
                                      $uid, $contact->id())) {
+                        Platal::session()->updateNbNotifs();
                         $page->trigSuccess("Contact retiré&nbsp;!");
                     }
                 }
@@ -280,6 +281,7 @@ class CarnetModule extends PLModule
                     if (XDB::execute("REPLACE INTO  contacts (uid, contact)
                                             VALUES  ({?}, {?})",
                                      $uid, $contact->id())) {
+                        Platal::session()->updateNbNotifs();
                         $page->trigSuccess('Contact ajouté&nbsp;!');
                     } else {
                         $page->trigWarning('Contact déjà dans la liste&nbsp;!');