Thanks to Leon. Your version looks much better than my one. I originaly had passed $wgOut just because I don't like globals, but now, that's OK for me.
P.S.: I had to unsubscribe and re-subscribe with an other mail account because I had underestimated the volume of the list and it made overflow my mailbox on the Wikivoyage server.
Hans