You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ju...@apache.org on 2019/12/20 18:20:30 UTC
[jspwiki] 08/10: JSPWIKI-120: move getDiff from WikiEngine to
DifferenceManager
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit b1b73c03c97a945a2db570550e39428a33cf4b39
Author: juanpablo <ju...@apache.org>
AuthorDate: Fri Dec 20 19:17:44 2019 +0100
JSPWIKI-120: move getDiff from WikiEngine to DifferenceManager
---
.../src/main/java/org/apache/wiki/WikiEngine.java | 29 ----------------------
1 file changed, 29 deletions(-)
diff --git a/jspwiki-main/src/main/java/org/apache/wiki/WikiEngine.java b/jspwiki-main/src/main/java/org/apache/wiki/WikiEngine.java
index 5be6d67..9db2f4e 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/WikiEngine.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/WikiEngine.java
@@ -1737,35 +1737,6 @@ public class WikiEngine {
}
/**
- * Returns a diff of two versions of a page.
- * <p>
- * Note that the API was changed in 2.6 to provide a WikiContext object!
- *
- * @param context The WikiContext of the page you wish to get a diff from
- * @param version1 Version number of the old page. If WikiPageProvider.LATEST_VERSION (-1), then uses current page.
- * @param version2 Version number of the new page. If WikiPageProvider.LATEST_VERSION (-1), then uses current page.
- *
- * @return A HTML-ized difference between two pages. If there is no difference, returns an empty string.
- */
- public String getDiff( WikiContext context, int version1, int version2 )
- {
- String page = context.getPage().getName();
- String page1 = getPureText( page, version1 );
- String page2 = getPureText( page, version2 );
-
- // Kludge to make diffs for new pages to work this way.
-
- if( version1 == WikiPageProvider.LATEST_VERSION )
- {
- page1 = "";
- }
-
- String diff = m_differenceManager.makeDiff( context, page1, page2 );
-
- return diff;
- }
-
- /**
* Returns this object's ReferenceManager.
* @return The current ReferenceManager instance.
*