-// {{{ function getNbNotifs
-
-function getNbNotifs()
-{
- if (!S::has('uid')) {
- return 0;
- }
- $uid = S::v('uid', -1);
- $watchlast = S::v('watch_last');
-
- // selectionne les notifs de uid, sans detail sur le watcher, depuis
- // $watchlast, meme ceux sans surveillance, non ordonnés
- $res = select_notifs(false, $uid, $watchlast, false);
- $n = $res->numRows();
- $res->free();
- if ($n == 0) {
- return;
- }
-
- return "<a href='carnet/panel'>$n événement".($n > 1 ? 's' : '')." !</a>";
-}
-
-// }}}