Skip to content

Commit f8ad639

Browse files
authored
Merge pull request #605 from poppastring/archive-bug-fix
Fixing archive bug which inadvertently modified the entry cache date.
2 parents db3a56c + 8ea6345 commit f8ad639

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

source/DasBlog.Web.UI/Controllers/ArchiveController.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ public IActionResult ArchiveAll()
8080
archiveManager.GetEntriesForYear(new DateTime(year, 1, 1) , languageFilter).OrderByDescending(x => x.CreatedUtc));
8181
}
8282

83-
entries = DateModification(entries);
84-
8583
var alvm = new ArchiveListViewModel();
8684

8785
foreach (var i in entries.ToList().Select(entry => mapper.Map<PostViewModel>(entry)).ToList())
@@ -127,20 +125,8 @@ private List<MonthViewViewModel> GetMonthsViewModel(DateTime dateTime, bool whol
127125
stopWatch.Stop();
128126
logger.LogInformation(new DasBlog.Services.ActivityLogs.EventDataItem(EventCodes.Site, null, $"ArchiveController (Date: {dateTime.ToLongDateString()}; Year: {wholeYear}) Time elapsed: {stopWatch.Elapsed.TotalMilliseconds}ms"));
129127

130-
entries = DateModification(entries);
131-
132128
DefaultPage(ARCHIVE);
133129
return MonthViewViewModel.Create(dateTime, entries, mapper);
134130
}
135-
136-
private EntryCollection DateModification(EntryCollection coll)
137-
{
138-
foreach (var entry in coll)
139-
{
140-
entry.CreatedUtc = dasBlogSettings.GetDisplayTime(entry.CreatedUtc);
141-
}
142-
143-
return coll;
144-
}
145131
}
146132
}

0 commit comments

Comments
 (0)