Skip to content

Commit

Permalink
Merge pull request #639 from poppastring/fix-mail-exceptions
Browse files Browse the repository at this point in the history
Fix for null reference exceptions
Fix theme formatting
  • Loading branch information
poppastring committed Jun 28, 2022
2 parents 1ea3622 + 6a19238 commit 173d6ea
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions source/DasBlog.Web.Repositories/BlogManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,10 @@ private string GetFromEmail()
{
if (string.IsNullOrWhiteSpace(dasBlogSettings.SiteConfiguration.SmtpFromEmail))
{
return dasBlogSettings.SiteConfiguration.SmtpUserName;
return dasBlogSettings.SiteConfiguration.SmtpUserName?.Trim();
}

return dasBlogSettings.SiteConfiguration.SmtpFromEmail.Trim();
return dasBlogSettings.SiteConfiguration.SmtpFromEmail?.Trim();
}
public bool SendTestEmail()
{
Expand Down
5 changes: 3 additions & 2 deletions source/DasBlog.Web.UI/Themes/median/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

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

<a href="#menu-toggle" class="btn btn-default" id="menu-toggle"><em class="fa fa-bars"></em></a>
<ul class="nav nav-pills flex-column sidebar-nav">
Expand All @@ -37,7 +37,8 @@
<a dasblog-unauthorized class="logout-button" asp-controller="account" asp-action="login"><em class="fa fa-power-off"></em>Signin</a>
<a dasblog-authorized class="logout-button" asp-controller="account" asp-action="logout"><em class="fa fa-power-off"></em>Signout</a>
</nav>
<main class="col-xs-12 col-sm-8 col-lg-9 col-xl-10 pt-3 pl-4 ml-auto">

<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">
<header class="page-header row justify-center">
<div class="col-md-6 col-lg-8">
<h1 class="site-title"> <site-title-link css="fa fa-rocket" /> </h1>
Expand Down
2 changes: 1 addition & 1 deletion source/DasBlog.Web.UI/Views/Shared/_BlogItems.cshtml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@model ListPostsViewModel


@if (Model.Posts.Count > 0)
@if (Model?.Posts?.Count > 0)
{
foreach (var post in Model.Posts)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@model ListPostsViewModel


@if (Model.Posts.Count > 0)
@if (Model?.Posts?.Count > 0)
{
int order = 0;

Expand Down

0 comments on commit 173d6ea

Please sign in to comment.