|
From: Benjamin C. <bc...@us...> - 2001-08-09 22:22:57
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv29048
Modified Files:
include.php
Log Message:
Added option to completely hide emails from people not logged in
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- include.php 2001/08/09 22:17:02 1.24
+++ include.php 2001/08/09 22:22:54 1.25
@@ -33,7 +33,8 @@
define ('THEME','default/'); // Which set of templates to use
define ('USE_JPGRAPH',0); // Whether to show images or not
define ('JPGRAPH_PATH', '/home/bcurtis/public_html/jp/'); // If it's not in the include path
-define ('MASKEMAIL', 1); // Should email addresses be plainly visible?
+define ('MASK_EMAIL', 1); // Should email addresses be plainly visible?
+define ('HIDE_EMAIL', 1); // Should email addresses be hidden for those not logged in?
require PHPLIBPATH.'db_mysql.inc';
require PHPLIBPATH.'ct_sql.inc';
@@ -407,7 +408,11 @@
///
/// If the constant is set do a little email masking to make harvesting a little harder
function maskemail($email) {
- if (MASKEMAIL) {
+ global $auth;
+
+ if (HIDE_EMAIL && $auth->auth['uid'] == 'nobody') {
+ return '******';
+ } elseif (MASK_EMAIL) {
return str_replace('@', ' at ', str_replace('.', ' dot ', $email));
} else {
return $email;
|