]> git.mjollnir.org Git - s9y.git/commitdiff
substring comment trace to 0,5
authorPenny Leach <mjollnir@titania.local>
Sat, 24 Jun 2006 09:41:45 +0000 (21:41 +1200)
committerPenny Leach <mjollnir@titania.local>
Sat, 24 Jun 2006 09:41:45 +0000 (21:41 +1200)
include/functions_comments.inc.php

index bf4d6080a735554f6613fc81b99db81a0d521ef4..7f51861d2b554d9824464c7738f3daefde577185 100644 (file)
@@ -194,7 +194,7 @@ function serendipity_generateCommentList($id, $comments = NULL, $selected = 0, $
     foreach ($comments as $comment) {
         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('&#160;', $level * 2) . '#' . $indent . $i . ': ' . (empty($comment['author']) ? ANONYMOUS : htmlspecialchars($comment['author'])) . ' ' . ON . ' ' . serendipity_mb('ucfirst', serendipity_strftime(DATE_FORMAT_SHORT, $comment['timestamp'])) . "</option>\n";
+            $retval .= '<option value="' . $comment['id'] . '"'. ($selected == $comment['id'] || (isset($serendipity['POST']['replyTo']) && $comment['id'] == $serendipity['POST']['replyTo']) ? ' selected="selected"' : '') .'>' . str_repeat('&#160;', $level * 2) . '#' . substr($indent . $i,0,5) . ': ' . (empty($comment['author']) ? ANONYMOUS : htmlspecialchars($comment['author'])) . ' ' . ON . ' ' . serendipity_mb('ucfirst', serendipity_strftime(DATE_FORMAT_SHORT, $comment['timestamp'])) . "</option>\n";
             $retval .= serendipity_generateCommentList($id, $comments, $selected, $comment['id'], $level + 1, $indent . $i . '.');
         }
     }
@@ -263,6 +263,7 @@ function serendipity_printComments($comments, $parentid = 0, $depth = 0, $trace
             $comment['body']    = $comment['comment'];
             $comment['pos']     = $i;
             $comment['trace']   = $trace . $i;
+            $comment['trace']   = substr($comment['trace'],0,5);
             $comment['depth']   = $depth;
             $comment['author']  = htmlspecialchars($comment['author']);