From 2f178ed9c715ee43739a489246f6b7ad4cba3887 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Tue, 10 Jun 2014 05:48:43 +0000 Subject: [PATCH] touched up code blame view --- codepot/src/codepot/views/code_blame.php | 26 ++++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/codepot/src/codepot/views/code_blame.php b/codepot/src/codepot/views/code_blame.php index 9a1c0e47..00669a46 100644 --- a/codepot/src/codepot/views/code_blame.php +++ b/codepot/src/codepot/views/code_blame.php @@ -199,6 +199,17 @@ if ($login['settings'] != NULL && { $line = $content[$i]; + if ($line['author'] != $author || $line['rev'] != $rev) + { + $author = $line['author']; + $author_padded = str_pad ($author, 9, ' ', STR_PAD_RIGHT); + $author_padded = substr($author_padded, 0, 9); + } + else + { + $author_padded = str_pad (' ', 9, ' ', STR_PAD_RIGHT); + } + if ($line['rev'] != $rev) { $rev = $line['rev']; @@ -212,19 +223,8 @@ if ($login['settings'] != NULL && $rev_padded = str_pad (' ', 6, ' ', STR_PAD_LEFT); } - if ($line['author'] != $author) - { - $author = $line['author']; - $author_padded = str_pad ($author, 8, ' ', STR_PAD_RIGHT); - $author_padded = substr($author_padded, 0, 8); - } - else - { - $author_padded = str_pad (' ', 8, ' ', STR_PAD_RIGHT); - } - - print "{$rev_padded}"; - print "{$author_padded}"; + print "{$rev_padded} "; + print "{$author_padded} "; print htmlspecialchars ($line['line']); print "\n";