jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jalka...@apache.org
Subject svn commit: r657316 - /incubator/jspwiki/branches/JSPWIKI_2_6_BRANCH/src/com/ecyrd/jspwiki/PageRenamer.java
Date Sat, 17 May 2008 08:10:17 GMT
Author: jalkanen
Date: Sat May 17 01:10:17 2008
New Revision: 657316

URL: http://svn.apache.org/viewvc?rev=657316&view=rev
Log:
JSPWIKI-252: No longer kills front page if there are attachments.

Modified:
    incubator/jspwiki/branches/JSPWIKI_2_6_BRANCH/src/com/ecyrd/jspwiki/PageRenamer.java

Modified: incubator/jspwiki/branches/JSPWIKI_2_6_BRANCH/src/com/ecyrd/jspwiki/PageRenamer.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_6_BRANCH/src/com/ecyrd/jspwiki/PageRenamer.java?rev=657316&r1=657315&r2=657316&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_2_6_BRANCH/src/com/ecyrd/jspwiki/PageRenamer.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_2_6_BRANCH/src/com/ecyrd/jspwiki/PageRenamer.java Sat
May 17 01:10:17 2008
@@ -235,20 +235,23 @@
         try
         {
 
-            WikiContext tempCtx = new WikiContext( m_wikiEngine, m_wikiEngine.getPage(referrerName)
);
-
-            if (context.getPage() != null)
+            if( m_wikiEngine.getPage( referrerName ) != null )
             {
-                PageLock lock = m_wikiEngine.getPageManager().getCurrentLock( context.getPage()
);
-                m_wikiEngine.getPageManager().unlockPage( lock );
+                WikiContext tempCtx = new WikiContext( m_wikiEngine, m_wikiEngine.getPage(
referrerName ) );
+
+                if( context.getPage() != null )
+                {
+                    PageLock lock = m_wikiEngine.getPageManager().getCurrentLock( context.getPage()
);
+                    m_wikiEngine.getPageManager().unlockPage( lock );
 
-                tempCtx.getPage().setAuthor( context.getCurrentUser().getName() );
-                m_wikiEngine.saveText( tempCtx, text );
+                    tempCtx.getPage().setAuthor( context.getCurrentUser().getName() );
+                    m_wikiEngine.saveText( tempCtx, text );
 
-                Collection updatedReferrers = m_wikiEngine.scanWikiLinks( m_wikiEngine.getPage(referrerName),text
);
+                    Collection updatedReferrers = m_wikiEngine.scanWikiLinks( m_wikiEngine.getPage(
referrerName ), text );
 
-                m_wikiEngine.getReferenceManager().updateReferences( referrerName, updatedReferrers
);
-             }
+                    m_wikiEngine.getReferenceManager().updateReferences( referrerName, updatedReferrers
);
+                }
+            }
         }
         catch( WikiException e )
         {



Mime
View raw message