Update of /cvsroot/php-blog/serendipity/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10634/include
Modified Files:
functions_comments.inc.php functions_entries.inc.php
Log Message:
unbreak gravatar plugins. instead the functions that display comments handle
a 'no_email' setting.
also don't hide things for logged in users.
Index: functions_comments.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/functions_comments.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- functions_comments.inc.php 24 Nov 2004 15:29:59 -0000 1.5
+++ functions_comments.inc.php 24 Nov 2004 15:52:02 -0000 1.6
@@ -177,7 +177,9 @@
serendipity_plugin_api::hook_event('frontend_display', $comment);
- if (!empty($comment['email'])) {
+ if (isset($comment['no_email']) && $comment['no_email']) {
+ $comment['email'] = false;
+ } elseif (!empty($comment['email'])) {
$comment['email'] = str_replace('@', '[at]', $comment['email']);
}
Index: functions_entries.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/functions_entries.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- functions_entries.inc.php 24 Nov 2004 10:17:14 -0000 1.5
+++ functions_entries.inc.php 24 Nov 2004 15:52:02 -0000 1.6
@@ -680,7 +680,9 @@
$entry['body'] = xhtml_cleanup($entry['body']);
// extract author information
- if (empty($entry['email'])) {
+ if (isset($entry['no_email']) && $entry['no_email']) {
+ $entry['email'] = '';
+ } elseif (empty($entry['email'])) {
$query = "select email FROM {$serendipity['dbPrefix']}authors WHERE username = '". serendipity_db_escape_string($entry['username']) ."'";
$results = serendipity_db_query($query);
$entry['email'] = $results[0]['email'];
|