summaryrefslogtreecommitdiff
path: root/Project-Unite/Views/Forum/ViewTopic.cshtml
diff options
context:
space:
mode:
Diffstat (limited to 'Project-Unite/Views/Forum/ViewTopic.cshtml')
-rw-r--r--Project-Unite/Views/Forum/ViewTopic.cshtml10
1 files changed, 10 insertions, 0 deletions
diff --git a/Project-Unite/Views/Forum/ViewTopic.cshtml b/Project-Unite/Views/Forum/ViewTopic.cshtml
index ed6b7c0..61ef682 100644
--- a/Project-Unite/Views/Forum/ViewTopic.cshtml
+++ b/Project-Unite/Views/Forum/ViewTopic.cshtml
@@ -3,6 +3,16 @@
@using Microsoft.AspNet.Identity
@{
ViewBag.Title = Model.Subject;
+ var db = new Project_Unite.Models.ApplicationDbContext();
+ var posts = db.ForumPosts.Where(x => x.Parent == Model.Id);
+ foreach(var post in posts.ToArray())
+ {
+ if (string.IsNullOrWhiteSpace(post.Subject))
+ {
+ post.Subject = Model.Subject;
+ }
+ }
+ db.SaveChanges();
}
<ul class="nav nav-tabs">