Add a 'markAsRead' hook.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 10 May 2011 16:50:32 +0000 (18:50 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 10 May 2011 16:50:32 +0000 (18:50 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
banana/banana.inc.php.in
banana/spool.inc.php

index 80b07ff..3f01181 100644 (file)
@@ -480,6 +480,9 @@ class Banana
             $groups    = Banana::$protocole->getBoxList(Banana::BOXES_SUB, Banana::$profile['lastnews'], true);
             Banana::$page->assign('groups', $groups);
         }
+        if (function_exists('hook_markAsRead')) {
+            hook_markAsRead($group, $artid, $msg);
+        }
         Banana::$page->assign_by_ref('message', $msg);
         Banana::$page->assign('extimages', Banana::$msgshow_hasextimages);
         Banana::$page->assign('headers', Banana::$msgshow_headers);
index 0c8affd..074a758 100644 (file)
@@ -313,7 +313,7 @@ class BananaSpool
                     if (!isset($this->ids[$msg])) {
                         continue;
                     }
-                    $msg = $this->ids[$msg];
+                    $msg = $this->ids[$msg]->id;
                 }
                 $this->markAsRead($msg);
             }