Hi, Good catch! I also made it so it also works for the frontpage.
- Sylvain On Sat, Nov 20, 2010 at 03:05:59PM +0000, Brian Gough wrote: > Hello everyone. > > I think it would be good if the news pages and atom feeds could be > considered public information, so that email addresses are not > obfuscated there(*). > > A simplistic patch to selectively display the addreses is below. > > I wasn't sure of the best way to implement it --- passing a parameter > from atom.php -> markup_full -> _markup_inline -> utils_email_basic > would add a lot of parameters. > > Therefore it seemed cleaner to use a (global) constant. Instead of > using CONTEXT it could be better to introduce an additional constant, > like ACCESS == 'public' or 'private' of course. However, I'm not > familiar enough with the savannah coding conventions to know what is > best. > > Brian > > (*) For example on the front page it currently says > > Help with installing loggerhead, the bzr web-based browser > ... > If you can do one of the above, we'd like to hear from you at -unavailable- > ! > > The same problem occurs when projects make public news annoucements > with email addresses included. > > > diff --git a/frontend/php/include/utils.php b/frontend/php/include/utils.php > index 68b778c..a4f231e 100644 > --- a/frontend/php/include/utils.php > +++ b/frontend/php/include/utils.php > @@ -178,7 +178,7 @@ function utils_email ($address, $nohtml=0) > # like the previous but does no extended search, just print as it comes > function utils_email_basic ($address, $nohtml=0) > { > - if (user_isloggedin()) > + if (user_isloggedin() || CONTEXT == 'forum' || CONTEXT == 'news') > { > if ($nohtml) > { return htmlspecialchars($address); } > >