From 2bf5df336883dc974538294cfb124a56a8b4e7a6 Mon Sep 17 00:00:00 2001 From: Dario Solera Date: Tue, 2 Feb 2010 10:29:17 +0000 Subject: [PATCH] Fixed and closed #475: links in breadcrumbs trail drop-down menu limited to 20. --- AssemblyVersion.cs | 4 ++-- WebApplication/Default.aspx.cs | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/AssemblyVersion.cs b/AssemblyVersion.cs index c0af8be..c72cfa1 100644 --- a/AssemblyVersion.cs +++ b/AssemblyVersion.cs @@ -16,5 +16,5 @@ using System.Reflection; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("3.0.1.469")] -[assembly: AssemblyFileVersion("3.0.1.469")] +[assembly: AssemblyVersion("3.0.1.470")] +[assembly: AssemblyFileVersion("3.0.1.470")] diff --git a/WebApplication/Default.aspx.cs b/WebApplication/Default.aspx.cs index 22fb0a9..652254b 100644 --- a/WebApplication/Default.aspx.cs +++ b/WebApplication/Default.aspx.cs @@ -467,23 +467,24 @@ namespace ScrewTurn.Wiki { StringBuilder buffer = new StringBuilder(300); buffer.AppendFormat(@"
", id); - bool pageAdded = false; + int count = 0; foreach(string link in outgoingLinks) { PageInfo target = Pages.FindPage(link); if(target != null) { - pageAdded = true; + count++; PageContent cont = Content.GetPageContent(target, true); string title = FormattingPipeline.PrepareTitle(cont.Title, false, FormattingContext.PageContent, currentPage); buffer.AppendFormat(@"{2}", link, Settings.PageExtension, title, title); } + if(count >= 20) break; } buffer.Append("
"); sb.Insert(0, buffer.ToString()); - if(pageAdded) return id; + if(count > 0) return id; else return null; }