Mitigated problem with page deletion (page link graph not updated correctly).
This commit is contained in:
parent
cec8bce4e7
commit
6733358ae9
5 changed files with 29 additions and 20 deletions
|
@ -113,25 +113,14 @@ namespace ScrewTurn.Wiki {
|
|||
}
|
||||
|
||||
protected void btnRebuildPageLinks_Click(object sender, EventArgs e) {
|
||||
RebuildPageLinks(Pages.GetPages(null));
|
||||
Pages.RebuildPageLinks(Pages.GetPages(null));
|
||||
foreach(NamespaceInfo nspace in Pages.GetNamespaces()) {
|
||||
RebuildPageLinks(Pages.GetPages(nspace));
|
||||
Pages.RebuildPageLinks(Pages.GetPages(nspace));
|
||||
}
|
||||
|
||||
DisplayOrphansCount();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rebuilds the page links for the specified pages.
|
||||
/// </summary>
|
||||
/// <param name="pages">The pages.</param>
|
||||
private void RebuildPageLinks(IList<PageInfo> pages) {
|
||||
foreach(PageInfo page in pages) {
|
||||
PageContent content = Content.GetPageContent(page, false);
|
||||
Pages.StorePageOutgoingLinks(page, content.Content);
|
||||
}
|
||||
}
|
||||
|
||||
protected void rptIndex_DataBinding(object sender, EventArgs e) {
|
||||
List<IndexRow> result = new List<IndexRow>(5);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue