Update of /cvsroot/php-blog/serendipity/include/admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29723
Modified Files:
comments.inc.php
Log Message:
Make "email" and "link" links - this required a little restructuring, sadly
Index: comments.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/admin/comments.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- comments.inc.php 26 Dec 2004 21:21:38 -0000 1.16
+++ comments.inc.php 26 Dec 2004 22:34:30 -0000 1.17
@@ -264,18 +264,6 @@
if (empty($rs['author'])) {
$rs['author'] = ANONYMOUS;
}
- if (empty($rs['ip'])) {
- $rs['ip'] = '0.0.0.0';
- }
- if (empty($rs['email'])) {
- $rs['email'] = 'N/A';
- }
- if (empty($rs['url'])) {
- $rs['url'] = 'N/A';
- }
- if (empty($rs['referer'])) {
-# $rs['referer'] = 'N/A';
- }
$fullBody = nl2br(strip_tags($rs['body']));
$summary = serendipity_mb('substr', $fullBody, 0, $summaryLength);
@@ -298,15 +286,43 @@
<tr>
<td rowspan="3" width="20" align="center"><input type="checkbox" name="serendipity[delete][<?php echo $rs['id'] ?>]" value="<?php echo $rs['entry_id'] ?>" onclick="highlightComment('comment_<?php echo $rs['id'] ?>', this.checked)" tabindex="<?php echo $i ?>" /></td>
<td width="40%"><strong><?php echo AUTHOR ?></strong>: <?php echo htmlspecialchars($rs['author']) ?></td>
- <td><strong><?php echo EMAIL ?></strong>: <?php echo htmlspecialchars($rs['email']) ?></td>
+ <td><strong><?php echo EMAIL ?></strong>:
+ <?php
+ if ( empty($rs['email']) ) {
+ echo 'N/A';
+ } else {
+ ?>
+ <a href="mailto:<?php echo htmlspecialchars($rs['email']) ?>"><?php echo htmlspecialchars($rs['email']) ?></a>
+ <?php } ?></td>
</tr>
<tr>
- <td width="40%"><strong>IP</strong>: <?php echo htmlspecialchars($rs['ip']) ?></td>
- <td><strong><?php echo URL; ?></strong>: <?php echo htmlspecialchars($rs['url']) ?></td>
+ <td width="40%"><strong>IP</strong>:
+ <?php
+ if ( empty($rs['ip']) ) {
+ echo '0.0.0.0';
+ } else {
+ echo htmlspecialchars($rs['ip']);
+ }
+ ?></td>
+ <td><strong><?php echo URL; ?></strong>:
+ <?php
+ if ( empty($rs['url']) ) {
+ echo 'N/A';
+ } else {
+ ?>
+ <a href="<?php echo htmlspecialchars($rs['url']) ?>" target="_blank"><?php echo htmlspecialchars($rs['url']) ?></a>
+ <?php } ?></td>
</tr>
<tr>
<td width="40%"> </td>
- <td><strong><?php echo REFERER; ?></strong>: <a href="<?php echo htmlspecialchars($rs['referer']) ?>" title="<?php echo htmlspecialchars($rs['referer']) ?>"><?php echo htmlspecialchars(serendipity_truncateString($rs['referer'],30)) ?></a></td>
+ <td><strong><?php echo REFERER; ?></strong>:
+ <?php
+ if ( empty($rs['referer']) ) {
+ echo 'N/A';
+ } else {
+ ?>
+ <a href="<?php echo htmlspecialchars($rs['referer']) ?>" title="<?php echo htmlspecialchars($rs['referer']) ?>"><?php echo htmlspecialchars(serendipity_truncateString($rs['referer'],30)) ?></a>
+ <?php } ?></td>
<tr>
<td style="border-top: 1px solid #CCCCCC; border-bottom: 1px solid #CCCCCC" colspan="3">
<div id="<?php echo $rs['id'] ?>_summary"><?php echo $summary ?></div>
|