Skip to content

Commit 2e2dc14

Browse files
author
JakeGinnivan
committed
Merged in SolutionMania/funnelweb-dev (pull request #29)
2 parents b964bcb + 83f71d5 commit 2e2dc14

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

src/FunnelWeb.Web/Areas/Admin/Controllers/WikiAdminController.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,14 @@ public virtual ActionResult Edit(EntryRevision model)
120120
tag.Add(entry);
121121
}
122122

123+
EventPublisher.Publish(new EntrySavedEvent(entry));
124+
123125
if (model.IsNew)
126+
{
124127
Repository.Add(entry);
128+
}
125129

126-
return RedirectToAction("Page", "Wiki", new { Area = "", page = model.Name});
130+
return RedirectToAction("Page", "Wiki", new { Area = "", page = entry.Name});
127131
}
128132

129133
private List<Tag> GetEditTags(EntryRevision model)

src/FunnelWeb/Eventing/INotifier.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,19 @@ public Comment Comment
5757
get { return comment; }
5858
}
5959
}
60+
61+
public class EntrySavedEvent : Event
62+
{
63+
private readonly Entry entry;
64+
65+
public EntrySavedEvent(Entry entry)
66+
{
67+
this.entry = entry;
68+
}
69+
70+
public Entry Entry
71+
{
72+
get { return entry; }
73+
}
74+
}
6075
}

0 commit comments

Comments
 (0)