]> 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 <penny@catalyst.net.nz>
Tue, 8 Apr 2008 00:04:18 +0000 (12:04 +1200)
include/functions_comments.inc.php

index 453d772c21eae8d5b826cf5a5ea5d11273bcdf67..99b995669710791e3f3226b4658d6fb14e91833d 100644 (file)
@@ -219,7 +219,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 . '.');
         }
     }
@@ -290,6 +290,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']);
             if (isset($comment['title'])) {