mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Using default value in audit trails when title is empty (#8106)
This commit is contained in:
parent
105a653a1d
commit
3f6e402d1d
@ -10,7 +10,11 @@
|
||||
var eventVersionNumber = eventData.Get<int>("VersionNumber");
|
||||
var isPublishedEvent = eventData.Get<bool>("Published");
|
||||
var itemDisplayText = contentItem != null ? Html.ItemDisplayText(contentItem) : default(IHtmlString);
|
||||
var title = itemDisplayText != null ? itemDisplayText.ToString() : eventData.Get<string>("Title") ?? "[untitled]";
|
||||
var title = itemDisplayText != null ? itemDisplayText.ToString() : eventData.Get<string>("Title");
|
||||
if (string.IsNullOrEmpty(title))
|
||||
{
|
||||
title = "[untitled]";
|
||||
}
|
||||
}
|
||||
<section class="audittrail-content-eventsummary">
|
||||
@if (contentItem != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user