savannah-hackers-public
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-hackers-public] email addresses in atom feed and news entries


From: Brian Gough
Subject: [Savannah-hackers-public] email addresses in atom feed and news entries
Date: Sat, 20 Nov 2010 15:05:59 +0000
User-agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/23.2 Mule/6.0 (HANACHIRUSATO)

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); }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]