jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mets...@apache.org
Subject svn commit: r1739629 - in /jspwiki/trunk: ChangeLog jspwiki-war/src/main/java/org/apache/wiki/Release.java jspwiki-war/src/main/java/org/apache/wiki/WikiEngine.java
Date Sun, 17 Apr 2016 16:48:16 GMT
Author: metskem
Date: Sun Apr 17 16:48:16 2016
New Revision: 1739629

URL: http://svn.apache.org/viewvc?rev=1739629&view=rev
Log:
2.10.3-svn-11

       * Fixed JSPWIKI-936 error when remove page with link (Fix by Andrew Krasnoff)

Modified:
    jspwiki/trunk/ChangeLog
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiEngine.java

Modified: jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/jspwiki/trunk/ChangeLog?rev=1739629&r1=1739628&r2=1739629&view=diff
==============================================================================
--- jspwiki/trunk/ChangeLog (original)
+++ jspwiki/trunk/ChangeLog Sun Apr 17 16:48:16 2016
@@ -1,5 +1,11 @@
 2016-04-17  Harry Metske (metskem@apache.org)
 
+       * 2.10.3-svn-11
+
+       * Fixed JSPWIKI-936 error when remove page with link (Fix by Andrew Krasnoff)
+
+2016-04-17  Harry Metske (metskem@apache.org)
+
        * 2.10.3-svn-10
 
        * Fixed JSPWIKI-935  RenderingManager uses ehcache if "jspwiki.usePageCache = false"

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java?rev=1739629&r1=1739628&r2=1739629&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java Sun Apr 17 16:48:16
2016
@@ -72,7 +72,7 @@ public final class Release {
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "10";
+    public static final String     BUILD         = "11";
 
     /**
      *  This is the generic version string you should use when printing out the version.
 It is of 

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiEngine.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiEngine.java?rev=1739629&r1=1739628&r2=1739629&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiEngine.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiEngine.java Sun Apr 17 16:48:16
2016
@@ -2182,12 +2182,17 @@ public class WikiEngine
             }
             else
             {
+                Collection<String> refTo = m_referenceManager.findRefersTo(pageName);
+
                 if (m_attachmentManager.hasAttachments( p ))
                 {
                     Collection attachments = m_attachmentManager.listAttachments( p );
                     for( Iterator atti = attachments.iterator(); atti.hasNext(); )
                     {
-                        m_attachmentManager.deleteAttachment( (Attachment)(atti.next()) );
+                        Attachment attachment = (Attachment)atti.next();
+                        refTo.remove(attachment.getName());
+
+                        m_attachmentManager.deleteAttachment( attachment );
                     }
                 }
                 m_pageManager.deletePage( p );



Mime
View raw message