Skip to content

Commit 173d6ea

Browse files
authored
Merge pull request #639 from poppastring/fix-mail-exceptions
Fix for null reference exceptions Fix theme formatting
2 parents 1ea3622 + 6a19238 commit 173d6ea

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

Diff for: source/DasBlog.Web.Repositories/BlogManager.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -466,10 +466,10 @@ private string GetFromEmail()
466466
{
467467
if (string.IsNullOrWhiteSpace(dasBlogSettings.SiteConfiguration.SmtpFromEmail))
468468
{
469-
return dasBlogSettings.SiteConfiguration.SmtpUserName;
469+
return dasBlogSettings.SiteConfiguration.SmtpUserName?.Trim();
470470
}
471471

472-
return dasBlogSettings.SiteConfiguration.SmtpFromEmail.Trim();
472+
return dasBlogSettings.SiteConfiguration.SmtpFromEmail?.Trim();
473473
}
474474
public bool SendTestEmail()
475475
{

Diff for: source/DasBlog.Web.UI/Themes/median/_Layout.cshtml

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
<div class="container-fluid" id="wrapper">
2222
<div class="row">
23-
<nav class="sidebar col-xs-12 col-sm-4 col-lg-3 col-xl-2">
23+
<nav class="sidebar col-xs-12 col-sm-4 col-lg-3 col-xl-2 bg-faded sidebar-style-1">
2424

2525
<a href="#menu-toggle" class="btn btn-default" id="menu-toggle"><em class="fa fa-bars"></em></a>
2626
<ul class="nav nav-pills flex-column sidebar-nav">
@@ -37,7 +37,8 @@
3737
<a dasblog-unauthorized class="logout-button" asp-controller="account" asp-action="login"><em class="fa fa-power-off"></em>Signin</a>
3838
<a dasblog-authorized class="logout-button" asp-controller="account" asp-action="logout"><em class="fa fa-power-off"></em>Signout</a>
3939
</nav>
40-
<main class="col-xs-12 col-sm-8 col-lg-9 col-xl-10 pt-3 pl-4 ml-auto">
40+
41+
<main class="col-xs-12 col-sm-8 offset-sm-4 col-lg-9 offset-lg-3 col-xl-10 offset-xl-2 pt-3 pl-4">
4142
<header class="page-header row justify-center">
4243
<div class="col-md-6 col-lg-8">
4344
<h1 class="site-title"> <site-title-link css="fa fa-rocket" /> </h1>

Diff for: source/DasBlog.Web.UI/Views/Shared/_BlogItems.cshtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@model ListPostsViewModel
22

33

4-
@if (Model.Posts.Count > 0)
4+
@if (Model?.Posts?.Count > 0)
55
{
66
foreach (var post in Model.Posts)
77
{

Diff for: source/DasBlog.Web.UI/Views/Shared/_BlogItemsSummary.cshtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@model ListPostsViewModel
22

33

4-
@if (Model.Posts.Count > 0)
4+
@if (Model?.Posts?.Count > 0)
55
{
66
int order = 0;
77

0 commit comments

Comments
 (0)