Browse Source

Fixed blog using old constant.

Modified migration and fixed some things.
tags/2.0.3
Teknikode 4 years ago
parent
commit
9caac7fab3
2 changed files with 2 additions and 6 deletions
  1. 1
    1
      Teknik/Areas/Blog/Views/Blog/Blog.cshtml
  2. 1
    5
      Teknik/Migrations/Configuration.cs

+ 1
- 1
Teknik/Areas/Blog/Views/Blog/Blog.cshtml View File

@@ -37,7 +37,7 @@
<div class="row">
<div class="col-sm-12 text-center">
<p>
<a href="@Url.SubRouteUrl("rss", "RSS.Blog", new { username = (Model.BlogId == Constants.SERVERBLOGID) ? string.Empty : Model.User.Username })"><i class="fa fa-rss fa-2x fa-border"></i></a>
<a href="@Url.SubRouteUrl("rss", "RSS.Blog", new { username = (Model.BlogId == Model.Config.BlogConfig.ServerBlogId) ? string.Empty : Model.User.Username })"><i class="fa fa-rss fa-2x fa-border"></i></a>
</p>
</div>
</div>

+ 1
- 5
Teknik/Migrations/Configuration.cs View File

@@ -146,10 +146,6 @@ namespace Teknik.Migrations
{
newUser.Groups.Add(adminGroup);
}
else
{
newUser.Groups.Add(memberGroup);
}
context.Users.AddOrUpdate(newUser);
context.SaveChanges();
int oldUserId = Int32.Parse(user["id"].ToString());
@@ -190,7 +186,7 @@ namespace Teknik.Migrations
}
newPost.DatePublished = publishDate;
newPost.DateEdited = publishDate;
newPost.Published = (post["published"].ToString() == "1");
newPost.Published = (post["published"].ToString() == "True");
newPost.Title = post["title"].ToString();
newPost.Article = post["post"].ToString();
context.BlogPosts.AddOrUpdate(newPost);

Loading…
Cancel
Save