Make comment recent changes dislpay more robust

This commit is contained in:
Starbeamrainbowlabs 2017-05-20 15:40:59 +01:00
parent f6c9ac075a
commit fa1f03f38a
3 changed files with 3 additions and 3 deletions

View File

@ -2908,7 +2908,7 @@ function render_recent_change($rchange)
break;
case "comment":
$resultClasses[] = "new-comment";
$result .= "<a href='?page=$rchange->page#$rchange->comment_id'>$pageDisplayHtml</a>";
$result .= "<a href='?page=$rchange->page#comment-" . (!empty($rchange->comment_id) ? "$rchange->comment_id" : "unknown_comment_id") . "'>$pageDisplayHtml</a> $editorDisplayHtml";
}
$resultAttributes = " " . (count($resultClasses) > 0 ? "class='" . implode(" ", $resultClasses) . "'" : "");

View File

@ -77,7 +77,7 @@
"author": "Starbeamrainbowlabs",
"description": "Adds recent changes. Access through the 'recent-changes' action.",
"id": "feature-recent-changes",
"lastupdate": 1495289861,
"lastupdate": 1495291194,
"optional": false
},
{

View File

@ -243,7 +243,7 @@ function render_recent_change($rchange)
break;
case "comment":
$resultClasses[] = "new-comment";
$result .= "<a href='?page=$rchange->page#$rchange->comment_id'>$pageDisplayHtml</a>";
$result .= "<a href='?page=$rchange->page#comment-" . (!empty($rchange->comment_id) ? "$rchange->comment_id" : "unknown_comment_id") . "'>$pageDisplayHtml</a> $editorDisplayHtml";
}
$resultAttributes = " " . (count($resultClasses) > 0 ? "class='" . implode(" ", $resultClasses) . "'" : "");