+ ),
+ mnesia:transaction(fun() ->
+ % comble les trous entre les id non-contigues
+ lists:foreach(fun(Id) ->
+ case mnesia:read({minichat, Id}) of
+ [] ->
+ {ok, #user{profile = Profile}} = euphorik_bd:user_by_id(0),
+ mnesia:write(#minichat{id = Id, auteur_id = 0, date = undefined, pseudo = Profile#profile.pseudo, contenu = "Comblement...", racine_id = Id, status = deleted});
+ _ -> rien
+ end
+ end,
+ lists:seq(1, mnesia:table_info(minichat, size))
+ ),
+ % la table troll utilise maintenant son index et pas celui de la table minichat (correction d'un vieux bug)
+ mnesia:write(#counter{key = troll, value = mnesia:table_info(minichat, size)})
+ end),\r