com web/bugs: More improvements for output_note(): ww w/bug.php
| From: | Maciej Sobaczewski | Date: | Tue, 24 Jan 2017 00:35:13 +0000 |
| Subject: | com web/bugs: More improvements for output_note(): ww w/bug.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-25546@lists.php.net to get a copy of this message | ||
Commit: b624b944eb82819d3bcf086ff52b872005a86161
Author: Sobak <msobaczewski@gmail.com> Tue, 24 Jan 2017 01:35:13 +0100
Parents: 98cd587a46190080649f8cca57036d65592f2a91
Branches: redesign
Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=b624b944eb82819d3bcf086ff52b872005a86161
Log:
More improvements for output_note()
Changed paths:
M www/bug.php
Diff:
diff --git a/www/bug.php b/www/bug.php
index 95f71b8..ca2143e 100644
--- a/www/bug.php
+++ b/www/bug.php
@@ -1144,7 +1144,7 @@ function is_php_user($email)
function output_note($com_id, $ts, $email, $comment, $comment_name, $comment_type = null)
{
- global $edit, $bug_id, $dbh, $is_trusted_developer, $logged_in;
+ global $edit, $bug_id, $is_trusted_developer;
// $com_id = 0 means the bug report itself is being displayed, not a comment
if ($com_id == 0) {
@@ -1161,13 +1161,18 @@ function output_note($com_id, $ts, $email, $comment, $comment_name,
$comment_typ
}
echo '<a class="genanchor" href="#' . ($com_id == 0 ?
'report' : 'comment-' . $com_id) . '"> ¶</a>';
- echo '<time class="date" datetime="' . format_date($ts, DATE_W3C)
.'">' . format_date($ts) . '</time>';
-
// Delete comment action only for trusted developers
echo ($edit == 1 && $com_id !== 0 && $is_trusted_developer &&
$comment_type != 'log')
? "<a
href='bug.php?id={$bug_id}&edit=1&delete_comment={$com_id}'>[delete]</a>\n"
: '';
+ echo '<time class="date" datetime="' . format_date($ts, DATE_W3C)
.'">' . format_date($ts) . '</time>';
+
+ // For text of the report itself strip first two lines (being
"Description:\n------------")
+ if ($com_id == 0) {
+ $comment = implode("\n", array_slice(explode("\n", $comment), 2));
+ }
+
if ($comment_type != 'log') {
$comment = '<pre>' . make_ticket_links(addlinks($comment)) .
'</pre>';
}