jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mets...@apache.org
Subject svn commit: r1429555 - in /incubator/jspwiki/trunk: ChangeLog src/org/apache/wiki/Release.java src/org/apache/wiki/tags/BreadcrumbsTag.java
Date Sun, 06 Jan 2013 17:07:51 GMT
Author: metskem
Date: Sun Jan  6 17:07:51 2013
New Revision: 1429555

URL: http://svn.apache.org/viewvc?rev=1429555&view=rev
Log:
2013-01-06  Harry Metske <metskem@apache.org>

       * 2.9.1-svn-13
       
		* fixed JSPWIKI-533  proper handling of page deletes and renames for the Breadcrumb trail


Modified:
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/src/org/apache/wiki/Release.java
    incubator/jspwiki/trunk/src/org/apache/wiki/tags/BreadcrumbsTag.java

Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=1429555&r1=1429554&r2=1429555&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Sun Jan  6 17:07:51 2013
@@ -1,5 +1,11 @@
 2013-01-06  Harry Metske <metskem@apache.org>
 
+       * 2.9.1-svn-13
+       
+		* fixed JSPWIKI-533  proper handling of page deletes and renames for the Breadcrumb trail

+
+2013-01-06  Harry Metske <metskem@apache.org>
+
        * 2.9.1-svn-12
        
 		* fixed JSPWIKI-439 Localization of JSPWiki

Modified: incubator/jspwiki/trunk/src/org/apache/wiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/Release.java?rev=1429555&r1=1429554&r2=1429555&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/Release.java Sun Jan  6 17:07:51 2013
@@ -75,7 +75,7 @@ public final class Release
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "12";
+    public static final String     BUILD         = "13";
     
     /**
      *  This is the generic version string you should use

Modified: incubator/jspwiki/trunk/src/org/apache/wiki/tags/BreadcrumbsTag.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/tags/BreadcrumbsTag.java?rev=1429555&r1=1429554&r2=1429555&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/tags/BreadcrumbsTag.java (original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/tags/BreadcrumbsTag.java Sun Jan  6 17:07:51
2013
@@ -120,6 +120,13 @@ public class BreadcrumbsTag extends Wiki
         if( trail == null )
         {
             trail = new FixedQueue(m_maxQueueSize);
+        } else {
+            //  check if page still exists (could be deleted/renamed by another user)
+            for (int i = 0;i<trail.size();i++) {
+                if (!m_wikiContext.getEngine().pageExists(trail.get(i))) {
+                    trail.remove(i);
+                }
+            }
         }
 
         if (m_wikiContext.getRequestContext().equals(WikiContext.VIEW))
@@ -133,15 +140,12 @@ public class BreadcrumbsTag extends Wiki
                 else
                 {
                     //
-                    // Don't add the page to the queue if the page was just
-                    // refreshed
+                    // Don't add the page to the queue if the page was just refreshed
                     //
                     if (!trail.getLast().equals(page))
                     {
                         trail.pushItem(page);
-                        log.debug("added page: " + page);
                     }
-                    log.debug("didn't add page because of refresh");
                 }
             }
             else
@@ -170,8 +174,7 @@ public class BreadcrumbsTag extends Wiki
 
             //FIXME: I can't figure out how to detect the appropriate jsp page to put here,
so I hard coded Wiki.jsp
             //This breaks when you view an attachment metadata page
-            out.print("<a class=\"" + linkclass + "\" href=\"" +
-                      m_wikiContext.getViewURL(curPage)+ "\">" + curPage + "</a>");
+            out.print("<a class=\"" + linkclass + "\" href=\"" + m_wikiContext.getViewURL(curPage)+
"\">" + curPage + "</a>");
 
             if( i < queueSize - 2 )
             {



Mime
View raw message