Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30439
Modified Files:
serendipity_functions.inc.php
Log Message:
Fix comment numbering
See http://chuhantirepeal.org/archives/21_On+Divisiveness.html and
http://chuhantirepeal.org/archives/26_Free+Times.html for examples of
heated, threaded debate -- with correct numbers!
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.335
retrieving revision 1.336
diff -u -d -r1.335 -r1.336
--- serendipity_functions.inc.php 15 Jul 2004 20:29:06 -0000 1.335
+++ serendipity_functions.inc.php 16 Jul 2004 04:22:01 -0000 1.336
@@ -1464,7 +1464,7 @@
if ($comment['parent_id'] == $parent) {
$i++;
$retval .= '<option value="' . $comment['id'] . '"'. ($selected == $comment['id'] || (isset($serendipity['POST']['replyTo']) && $comment['id'] == $serendipity['POST']['replyTo']) ? ' selected="selected"' : '') .'>' . str_repeat(' ', $level * 2) . '#' . $indent . $i . ': ' . (empty($comment['username']) ? ANONYMOUS : $comment['username']) . ' ' . ON . ' ' . ucfirst(strftime('%b %e %Y, %H:%M', $comment['timestamp'])) . "</option>\n";
- $retval .= serendipity_generateCommentList($id, $comments, $selected, $comment['id'], $level + 1, $i . '.');
+ $retval .= serendipity_generateCommentList($id, $comments, $selected, $comment['id'], $level + 1, $indent . $i . '.');
}
}
$retval .= $parent ? '' : '</select>';
@@ -1486,9 +1486,9 @@
$i = 0;
foreach ($comments as $comment) {
- $i++;
if (!isset($comment['parent_id']) || $comment['parent_id'] == $parentid) {
+ $i++;
$comment['comment'] = htmlspecialchars(strip_tags($comment['body']));
if (!empty($comment['url']) && substr($comment['url'], 0, 7) != 'http://' && substr($comment['url'], 0, 8) != 'https://') {
@@ -1538,7 +1538,7 @@
</div>
<?php
if ( $comment['id'] ) {
- serendipity_printComments($comments, $allow_comments, $show_admin, $comment['id'], $i . '.');
+ serendipity_printComments($comments, $allow_comments, $show_admin, $comment['id'], $indent . $i . '.');
}
?>
</div>
|