mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-01-19 17:51:45 +08:00
Using default value in audit trails when title is empty (#8106)
This commit is contained in:
committed by
Sébastien Ros
parent
105a653a1d
commit
3f6e402d1d
@@ -10,7 +10,11 @@
|
|||||||
var eventVersionNumber = eventData.Get<int>("VersionNumber");
|
var eventVersionNumber = eventData.Get<int>("VersionNumber");
|
||||||
var isPublishedEvent = eventData.Get<bool>("Published");
|
var isPublishedEvent = eventData.Get<bool>("Published");
|
||||||
var itemDisplayText = contentItem != null ? Html.ItemDisplayText(contentItem) : default(IHtmlString);
|
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">
|
<section class="audittrail-content-eventsummary">
|
||||||
@if (contentItem != null) {
|
@if (contentItem != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user